Function at 0x404a27
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xa0
mov eax, dword [0x44db30]
xor eax, esp
mov dword [esp + 0x9c], eax
push ebx
mov ebx, dword [esp + 0xb0]
lea eax, [esp + 0x3c]
push esi
mov esi, dword [esp + 0xac]
push str.lrecnr
push esi
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x1c], ebx
call fcn.00410ba5
add esp, 0xc
mov word [0x452f48], ax
test ax, ax
jns 0x404a77
cwde
jmp 0x404ef8
mov eax, dword [esp + 0x40]
push edi
push 0x42611c
push dword [esi*4 + 0x43b0a0]
mov dword [esp + 0x38], eax
call fcn.0040edf2
mov edi, eax
pop ecx
pop ecx
test edi, edi
jns 0x404aa0
xor eax, eax
jmp 0x404ef7
push 2
push dword [esi*4 + 0x43b0a0]
call fcn.004059b5
pop ecx
pop ecx
test eax, eax
jns 0x404abc
or eax, 0xffffffff
jmp 0x404ef7
push ebp
push 2
push 0
push edi
call fcn.0041445f
mov ebp, eax
mov dword [esp + 0x20], ebp
lea ecx, [ebp + 1]
push ecx
call fcn.00413d15
add esp, 0x10
mov dword [esp + 0x28], eax
test eax, eax
je 0x404d10
xor eax, eax
push eax
push eax
push edi
mov dword [esp + 0x48], eax
call fcn.0041445f
push ebp
push dword [esp + 0x38]
push edi
call fcn.004145f5
xor ebp, ebp
add esp, 0x18
inc ebp
cmp eax, dword [esp + 0x14]
jne 0x404d01
and dword [esp + 0x18], 0
and dword [esp + 0x24], 0
push ebx
call fcn.00413bf0
movzx eax, ax
mov dword [esp + 0x24], eax
movzx eax, word [esi*2 + 0x43bbd0]
cwde
mov dword [esp + 0x3c], eax
sub eax, dword [esp + 0x50]
pop ecx
mov dword [esp + 0x44], eax
xor ecx, ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
test eax, eax
jle 0x404cab
mov eax, dword [esp + 0xb8]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x34], eax
add eax, dword [esp + 0x44]
push eax
call fcn.00413cf8
pop ecx
xor ecx, ecx
cmp dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
cmove ecx, ebp
mov dword [esp + 0x40], ecx
test ax, ax
jle 0x404baa
push eax
push ebx
push dword [esp + 0x3c]
call fcn.0040fdbd
mov ecx, dword [esp + 0x38]
add esp, 0xc
test eax, eax
cmovns ecx, ebp
mov dword [esp + 0x2c], ecx
jmp 0x404bae
mov ecx, dword [esp + 0x2c]
cmp word [esp + 0x40], bp
je 0x404bbe
cmp cx, bp
jne 0x404c5d
mov eax, dword [esp + 0x24]
cmp ax, bp
jne 0x404be6
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x1c]
push eax
push edi
call fcn.004150f3
mov eax, dword [esp + 0x30]
add esp, 0xc
test ax, ax
jne 0x404bfa
push 0
push dword [esp + 0x14]
push edi
call fcn.0041445f
add esp, 0xc
mov eax, dword [esp + 0x2c]
cmp ax, bp
jne 0x404c3f
xor eax, eax
test esi, esi
jle 0x404c18
cmp byte [ebx + eax], 0
jne 0x404c13
mov byte [ebx + eax], 0x7e
inc eax
cmp eax, esi
jl 0x404c09
push esi
push ebx
push edi
call fcn.004150f3
push ebp
push 0
push edi
call fcn.0041445f
mov dword [esp + 0x54], eax
add esp, 0x18
mov eax, dword [esp + 0x10]
and dword [esp + 0x20], 0
mov dword [esp + 0x18], eax
jmp 0x404c43
mov eax, dword [esp + 0x10]
cmp word [esp + 0x40], bp
jne 0x404c55
add eax, esi
and dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov edx, ebp
mov dword [esp + 0x24], edx
jmp 0x404c61
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add ecx, esi
mov dword [esp + 0x10], ecx
cmp ecx, eax
jl 0x404b5c
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
cmp dx, bp
jne 0x404cb3
test cx, cx
jg 0x404c90
cmp dword [esp + 0x1c], 0
jle 0x404cb3
sub eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x1c]
push eax
push edi
call fcn.004150f3
mov eax, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
test cx, cx
jle 0x404ced
test dx, dx
jne 0x404cc9
push 0
push eax
push edi
call fcn.0041445f
add esp, 0xc
mov ecx, dword [esp + 0x38]
xor eax, eax
test ecx, ecx
jle 0x404ce2
cmp byte [ebx + eax], 0
jne 0x404cdd
mov byte [ebx + eax], 0x7e
inc eax
cmp eax, ecx
jl 0x404cd3
push ecx
push ebx
push edi
call fcn.004150f3
add esp, 0xc
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x404d01
push 0
push eax
push edi
call fcn.0041445f
add esp, 0xc
push dword [esp + 0x28]
call fcn.00415075
pop ecx
jmp 0x404edd
push dword [esp + 0x18]
xor edi, edi
xor ebx, ebx
call fcn.00413bf0
xor ebp, ebp
movzx eax, ax
inc ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x1c]
pop ecx
push dword [esi*4 + 0x43b510]
movsx eax, word [esi*2 + 0x43bbd0]
inc ebx
push eax
push ebx
push dword [esi*4 + 0x43b0a0]
call fcn.0040f036
movzx eax, ax
add esp, 0x10
test ax, ax
jns 0x404d63
cmp ax, 0xfffc
jne 0x404e92
push dword [esp + 0x34]
call fcn.00413cf8
pop ecx
cmp dword [esp + 0xb8], eax
jne 0x404d8d
cmp dword [esp + 0x10], ebx
jle 0x404d30
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
cwde
push eax
push ebx
jmp 0x404e7e
mov eax, dword [esp + 0x1c]
inc edi
inc dword [esp + 0x10]
test ax, ax
jle 0x404e24
push eax
push ebp
push dword [esi*4 + 0x43b510]
call fcn.0040fdbd
add esp, 0xc
test eax, eax
js 0x404e24
movzx eax, word [esi*2 + 0x43bbd0]
mov dword [esp + 0x14], eax
cwde
push eax
push dword [esi*4 + 0x43b510]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x5c]
push eax
call fcn.00413380
movsx eax, word [esi*2 + 0x43bbd0]
push ebp
push eax
push edi
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
add esp, 0x1c
cmp edi, ebx
jne 0x404dfc
inc edi
inc dword [esp + 0x10]
jmp 0x404e1a
lea eax, [esp + 0x54]
inc edi
inc dword [esp + 0x10]
push eax
push dword [esp + 0x34]
push edi
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
add esp, 0x10
and dword [esp + 0x1c], 0
jmp 0x404d30
cmp edi, ebx
je 0x404d30
jle 0x404e6d
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
cwde
push eax
push ebx
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
movzx eax, word [esi*2 + 0x43bbd0]
mov dword [esp + 0x24], eax
cwde
push eax
push dword [esi*4 + 0x43b510]
lea eax, [esp + 0x6c]
push eax
call fcn.00413380
add esp, 0x1c
jmp 0x404d30
push dword [esi*4 + 0x43b510]
movsx eax, word [esi*2 + 0x43bbd0]
push eax
push edi
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
add esp, 0x10
jmp 0x404d30
mov eax, dword [esp + 0x1c]
push 1
pop ebp
test ax, ax
jle 0x404ebe
push dword [esp + 0x18]
movsx eax, word [esi*2 + 0x43bbd0]
push eax
lea eax, [edi + 1]
push eax
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
add esp, 0x10
cmp edi, ebx
jne 0x404edd
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
cwde
push eax
push ebx
push dword [esi*4 + 0x43b0a0]
call fcn.0040f931
add esp, 0x10
push ebp
push dword [esi*4 + 0x43b0a0]
call fcn.004059b5
pop ecx
pop ecx
or ecx, 0xffffffff
test eax, eax
cmovs ebp, ecx
mov eax, ebp
pop ebp
pop edi
mov ecx, dword [esp + 0xa4]
pop esi
pop ebx
xor ecx, esp
call fcn.00413da7
add esp, 0xa0
ret