Function at 0x4d7f10
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x30
push ebx
mov ebx, dword [esp + 0x3c]
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x44]
push esi
push edi
je 0x4d7f9b
test ebp, ebp
je 0x4d7f9b
cmp dword [ebx + 0x14], 0
je 0x4d7f32
mov eax, dword [ebx + 0x18]
jmp 0x4d7f3e
mov eax, dword [ebx + 4]
push eax
call fcn.00609413
add esp, 4
lea edi, [eax - 2]
mov esi, ebx
mov dword [esp + 0x24], edi
call fcn.00410290
mov edx, dword [esp + 0x44]
mov dword [esp + 0x20], eax
mov eax, dword [edx + 0x10]
xor ecx, ecx
shr eax, 1
je 0x4d7f82
mov edx, dword [edx + 0xc]
mov dword [esp + 0x4c], edx
mov esi, dword [edx]
cmp dword [esi + 4], 0xffffffff
jne 0x4d7f78
add ecx, 1
add edx, 4
cmp ecx, eax
jb 0x4d7f64
jmp 0x4d7f82
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + ecx*4]
mov edi, dword [eax + 4]
lea eax, [esp + 0x18]
call fcn.00487150
cmp dword [esp + 0x1c], 0
jne 0x4d7faa
lea esi, [esp + 0x18]
call fcn.00487190
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
cmp dword [ebx + 0x14], 0
je 0x4d7ffb
mov ecx, dword [ebx + 0x1c]
xor edx, edx
cmp edx, ecx
sbb eax, eax
not eax
and eax, ecx
mov dword [ebx + 0x18], eax
cmp dword [ebx + 0x14], 0
mov esi, dword [esp + 0x18]
je 0x4d8027
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x48]
mov eax, esi
call fcn.00410220
cmp eax, esi
je 0x4d8072
lea esi, [esp + 0x18]
mov edi, 2
call fcn.00487190
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [ebx + 4]
push 0
push 0
push eax
call fcn.006081d8
add esp, 0xc
test eax, eax
je 0x4d7fc0
lea esi, [esp + 0x18]
call fcn.00487190
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [ebx + 4]
test eax, eax
je 0x4d8047
mov ecx, dword [esp + 0x1c]
push eax
push 1
push esi
push ecx
call fcn.0060860a
add esp, 0x10
test eax, eax
je 0x4d8047
xor ebx, ebx
jmp 0x4d8057
cmp dword [ebx + 4], 0
je 0x4d8054
mov ebx, 2
jmp 0x4d8057
mov ebx, dword [ebx + 0xc]
test ebx, ebx
mov edi, ebx
je 0x4d8072
lea esi, [esp + 0x18]
call fcn.00487190
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
test esi, esi
je 0x4d817b
mov eax, dword [ebp + 4]
mov ebx, eax
shr ebx, 1
lea edi, [ebx + esi]
cmp edi, 0x7fffffff
jbe 0x4d80b0
mov eax, dword [ebp]
test eax, eax
je 0x4d800f
push eax
call fcn.0045da90
add esp, 4
and dword [ebp + 4], 1
mov dword [ebp], 0
jmp 0x4d800f
and eax, 1
cmp edi, ebx
jne 0x4d80bf
mov eax, dword [ebp]
jmp 0x4d815f
test eax, eax
je 0x4d80e3
mov edx, dword [ebp]
push edi
push edx
call fcn.0045d790
mov ecx, dword [ebp + 4]
and ecx, 1
lea edx, [edi + edi]
add esp, 8
or ecx, edx
mov dword [ebp], eax
mov dword [ebp + 4], ecx
jmp 0x4d815f
mov esi, 1
cmp edi, esi
jb 0x4d80f6
lea esp, [esp]
add esi, esi
cmp esi, edi
jbe 0x4d80f0
mov eax, dword [ebp]
mov ecx, ebx
test ecx, ecx
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
jge 0x4d810d
fadd dword [0x6c0a38]
fstp dword [esp + 0x4c]
mov ecx, dword [esp + 0x4c]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x4d812c
mov edx, 1
shl edx, cl
jmp 0x4d812e
xor edx, edx
cmp edx, ebx
jae 0x4d8134
add edx, edx
cmp edx, esi
je 0x4d814d
push esi
push eax
call fcn.0045d790
add esp, 8
test eax, eax
mov dword [ebp], eax
je 0x4d800f
mov edx, dword [ebp + 4]
mov esi, dword [esp + 0x18]
and edx, 1
lea ecx, [edi + edi]
or edx, ecx
mov dword [ebp + 4], edx
test eax, eax
je 0x4d800f
mov edx, dword [esp + 0x1c]
mov eax, dword [ebp]
push esi
push edx
add eax, ebx
push eax
call fcn.0060d1b0
add esp, 0xc
cmp dword [ebp + 0x10], 0
je 0x4d81ce
mov edx, dword [ebp + 4]
shr edx, 1
cmp edx, dword [ebp + 0x24]
jb 0x4d81ce
mov eax, dword [ebp + 0x10]
test eax, eax
mov ecx, dword [ebp]
je 0x4d81a4
push eax
push edx
push 1
push ecx
call fcn.00608896
add esp, 0x10
jmp 0x4d81a6
xor eax, eax
mov ecx, dword [ebp + 4]
shr ecx, 1
cmp eax, ecx
jne 0x4d800f
mov eax, dword [ebp]
test eax, eax
je 0x4d81ce
push eax
call fcn.0045da90
add esp, 4
and dword [ebp + 4], 1
mov dword [ebp], 0
lea esi, [esp + 0x18]
call fcn.00487190
mov edi, dword [esp + 0x44]
xor esi, esi
lea edx, [esp + 0x2c]
lea eax, [edi + 0xc]
push edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], esi
call fcn.004d92c0
xor eax, eax
test dword [edi + 0x10], 0xfffffffe
mov dword [esp + 0x4c], eax
jbe 0x4d8339
lea ecx, [ecx]
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x4d821f
mov ecx, dword [ecx]
mov eax, dword [ecx + eax*4]
jmp 0x4d8226
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + eax*4]
mov ecx, dword [edi + 0xc]
mov ebx, dword [ecx + eax*4]
cmp byte [ebx + 1], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
jne 0x4d82ef
mov ecx, dword [ebx + 4]
cmp ecx, 0xffffffff
je 0x4d82ef
mov edi, dword [esp + 0x48]
cmp dword [edi + 0x14], 0
lea eax, [ecx + 4]
je 0x4d8265
mov ecx, dword [edi + 0x1c]
cmp ecx, eax
ja 0x4d8260
mov eax, ecx
mov dword [edi + 0x18], eax
jmp 0x4d827c
mov edx, dword [edi + 4]
push 0
push eax
push edx
call fcn.006081d8
add esp, 0xc
test eax, eax
jne 0x4d83e5
mov eax, dword [ebx + 8]
push 0
lea ecx, [ebx + 0x14]
call fcn.00487200
mov esi, eax
test esi, esi
jne 0x4d831c
cmp dword [edi + 0x14], eax
mov ecx, dword [ebx + 0x18]
mov esi, dword [ebx + 8]
je 0x4d82b1
mov eax, esi
mov ebx, ecx
call fcn.00410220
cmp eax, esi
jne 0x4d8317
mov ebx, dword [esp + 0x18]
jmp 0x4d82e3
mov eax, dword [edi + 4]
test eax, eax
je 0x4d82cd
push eax
push 1
push esi
push ecx
call fcn.0060860a
add esp, 0x10
test eax, eax
je 0x4d82cd
xor edi, edi
jmp 0x4d82dd
cmp dword [edi + 4], 0
je 0x4d82da
mov edi, 2
jmp 0x4d82dd
mov edi, dword [edi + 0xc]
test edi, edi
mov esi, edi
jne 0x4d831c
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
mov byte [ebx + 1], 1
mov esi, ebp
mov ecx, edi
call fcn.004d94a0
mov esi, eax
test esi, esi
jne 0x4d831c
mov eax, dword [esp + 0x4c]
mov ecx, dword [edi + 0x10]
add eax, 1
shr ecx, 1
cmp eax, ecx
mov dword [esp + 0x4c], eax
jae 0x4d8339
jmp 0x4d8210
mov esi, 2
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d832d
push eax
call fcn.0045da90
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
sub eax, ebx
mov esi, eax
mov dword [esp + 0x44], esi
je 0x4d85b8
xor edi, edi
lea eax, [esp + 0x24]
call fcn.00487150
push edi
mov eax, esi
lea ecx, [esp + 0x28]
call fcn.00487200
test eax, eax
je 0x4d8393
lea esi, [esp + 0x24]
call fcn.00487190
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d8384
push eax
call fcn.0045da90
add esp, 4
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov edi, dword [esp + 0x48]
cmp dword [edi + 0x14], 0
je 0x4d83c9
mov eax, dword [edi + 0x1c]
cmp eax, ebx
ja 0x4d83a6
mov ebx, eax
mov dword [edi + 0x18], ebx
cmp dword [edi + 0x14], 0
je 0x4d8405
mov ebx, dword [esp + 0x28]
mov eax, esi
call fcn.00410220
cmp eax, esi
je 0x4d845f
mov edi, 2
jmp 0x4d8439
mov edx, dword [edi + 4]
push 0
push ebx
push edx
call fcn.006081d8
add esp, 0xc
test eax, eax
je 0x4d83a9
lea esi, [esp + 0x24]
call fcn.00487190
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d83f6
push eax
call fcn.0045da90
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [edi + 4]
test eax, eax
je 0x4d8425
push eax
mov eax, dword [esp + 0x2c]
push 1
push esi
push eax
call fcn.0060860a
add esp, 0x10
test eax, eax
je 0x4d8425
xor edi, edi
jmp 0x4d8435
cmp dword [edi + 4], 0
je 0x4d8432
mov edi, 2
jmp 0x4d8435
mov edi, dword [edi + 0xc]
test edi, edi
je 0x4d845f
lea esi, [esp + 0x24]
call fcn.00487190
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d8453
push eax
call fcn.0045da90
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [ebp + 4]
mov ebx, eax
shr ebx, 1
lea edi, [ebx + esi]
cmp edi, 0x7fffffff
jbe 0x4d8495
mov eax, dword [ebp]
test eax, eax
je 0x4d83dc
push eax
call fcn.0045da90
add esp, 4
and dword [ebp + 4], 1
mov dword [ebp], 0
jmp 0x4d83dc
and eax, 1
cmp edi, ebx
jne 0x4d84a4
mov eax, dword [ebp]
jmp 0x4d8540
test eax, eax
je 0x4d84c8
mov ecx, dword [ebp]
push edi
push ecx
call fcn.0045d790
mov ecx, dword [ebp + 4]
lea edx, [edi + edi]
and ecx, 1
add esp, 8
or edx, ecx
mov dword [ebp], eax
mov dword [ebp + 4], edx
jmp 0x4d8540
mov esi, 1
cmp edi, esi
jb 0x4d84d7
add esi, esi
cmp esi, edi
jbe 0x4d84d1
mov eax, dword [ebp]
mov edx, ebx
test edx, edx
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
jge 0x4d84ee
fadd dword [0x6c0a38]
fstp dword [esp + 0x48]
mov ecx, dword [esp + 0x48]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x4d850d
mov edx, 1
shl edx, cl
jmp 0x4d850f
xor edx, edx
cmp edx, ebx
jae 0x4d8515
add edx, edx
cmp edx, esi
je 0x4d852e
push esi
push eax
call fcn.0045d790
add esp, 8
test eax, eax
mov dword [ebp], eax
je 0x4d83dc
mov edx, dword [ebp + 4]
mov esi, dword [esp + 0x44]
lea ecx, [edi + edi]
and edx, 1
or ecx, edx
mov dword [ebp + 4], ecx
test eax, eax
je 0x4d83dc
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp]
push esi
push eax
add ecx, ebx
push ecx
call fcn.0060d1b0
add esp, 0xc
cmp dword [ebp + 0x10], 0
je 0x4d85af
mov edx, dword [ebp + 4]
shr edx, 1
cmp edx, dword [ebp + 0x24]
jb 0x4d85af
mov eax, dword [ebp + 0x10]
test eax, eax
mov ecx, dword [ebp]
je 0x4d8585
push eax
push edx
push 1
push ecx
call fcn.00608896
add esp, 0x10
jmp 0x4d8587
xor eax, eax
mov edx, dword [ebp + 4]
shr edx, 1
cmp eax, edx
jne 0x4d83dc
mov eax, dword [ebp]
test eax, eax
je 0x4d85af
push eax
call fcn.0045da90
add esp, 4
and dword [ebp + 4], 1
mov dword [ebp], 0
lea esi, [esp + 0x24]
call fcn.00487190
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d85c9
push eax
call fcn.0045da90
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret 0xc