Function at 0x4d9f00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5481fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x480
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x30], edi
movsx eax, word [edi + 0x16]
movsx ecx, word [edi + 0x12]
movsx edx, word [edi + 0x14]
sub eax, ecx
lea ecx, [esp + 0x34]
inc eax
push eax
movsx eax, word [edi + 0x10]
sub edx, eax
inc edx
push edx
push 0
push 0
call fcn.004c9320
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x28]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x4a4]
push eax
push ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], edx
call fcn.004c95c0
mov ebp, dword [eax]
push 0x8001
mov dword [esp + 0x14], ebp
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x4a4]
push eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.MSVCRT.dll__open]
mov ebx, eax
add esp, 8
xor esi, esi
test ebx, ebx
jg 0x4d9ff2
mov ecx, dword [esp + 0x4a0]
push 0x180
push 0x8301
push ecx
call dword [sym.imp.MSVCRT.dll__open]
movsx edx, word [edi + 0x16]
mov ebx, eax
add esp, 0xc
movsx eax, word [edi + 0x12]
movsx ecx, word [edi + 0x14]
sub edx, eax
inc edx
push edx
movsx edx, word [edi + 0x10]
sub ecx, edx
inc ecx
push ecx
push esi
push esi
lea ecx, [esp + 0x30]
call fcn.004c9320
mov ebp, dword [eax]
mov esi, 1
test ebx, ebx
mov eax, dword [eax + 4]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
jle 0x4da28a
lea ecx, [esp + 0x3c]
call fcn.0047ff60
lea ecx, [esp + 0x50]
call fcn.0047ff80
mov ecx, dword [esp + 0x4a8]
lea edx, [esp + 0x90]
push ecx
lea eax, [esp + 0x54]
push edx
lea ecx, [esp + 0x44]
push eax
push ecx
mov ecx, edi
call fcn.004da7f0
test esi, esi
mov dword [esp + 0x28], eax
je 0x4da068
mov esi, dword [sym.imp.MSVCRT.dll__write]
lea edx, [esp + 0x3c]
push 0xe
push edx
push ebx
call esi
lea eax, [esp + 0x5c]
push 0x28
push eax
push ebx
call esi
mov eax, dword [esp + 0x40]
add esp, 0x18
test eax, eax
jle 0x4da068
lea ecx, [eax*4]
lea edx, [esp + 0x90]
push ecx
push edx
push ebx
call esi
add esp, 0xc
mov eax, dword [esp + 0x5e]
xor edx, edx
and eax, 0xffff
push 0
add eax, 7
sar eax, 3
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x68]
div dword [esp + 0x5c]
movsx esi, bp
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x4a]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
mov ecx, dword [esp + 0x64]
mov ebp, eax
movsx eax, word [esp + 0x1e]
sub ecx, eax
add esp, 0xc
dec ecx
mov edx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
add ebp, ecx
mov ecx, esi
imul ecx, edx
add ebp, ecx
mov ecx, dword [0x67a8d8]
cmp ecx, 0x18
mov dword [esp + 0x34], ebp
jl 0x4da0d5
mov ecx, 0x18
cmp dword [esp + 0x4a8], ecx
je 0x4da216
movsx eax, word [edi + 0x16]
movsx ecx, word [edi + 0x12]
mov edx, dword [esp + 0x4a8]
sub eax, ecx
inc eax
push edx
movsx edx, word [edi + 0x14]
push eax
lea ecx, [esp + 0x80]
movsx eax, word [edi + 0x10]
sub edx, eax
inc edx
push edx
call fcn.004bb710
movsx edi, word [esp + 0x12]
movsx eax, word [esp + 0x16]
cmp edi, eax
mov dword [esp + 0x498], 0
mov dword [esp + 0x1c], eax
jg 0x4da1a0
movsx eax, word [esp + 0x14]
cmp esi, eax
jg 0x4da192
mov ecx, dword [esp + 0x30]
lea ebp, [ecx + 0x1c]
push edi
lea edx, [esp + 0x50]
push esi
push edx
mov ecx, ebp
call fcn.004bb8d0
mov eax, dword [eax]
mov ecx, eax
mov edx, eax
shr ecx, 3
shr eax, 8
and ecx, 0xfc
and eax, 0xf8
and edx, 0x1f
add eax, ecx
lea ecx, [eax + edx*8]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
push edx
push edi
push esi
lea ecx, [esp + 0x84]
call fcn.004bb980
movsx eax, word [esp + 0x14]
inc esi
cmp esi, eax
jle 0x4da13b
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x20]
movsx eax, word [esp + 0x16]
inc edi
mov dword [esp + 0x1c], eax
cmp edi, eax
jle 0x4da12b
movsx edi, word [esp + 0x12]
cmp edi, eax
jg 0x4da1f1
movsx eax, word [esp + 0x14]
sub eax, esi
inc eax
imul eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
push 0
push ebp
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x78]
push eax
push edi
push esi
call fcn.004bc3a0
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__write]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
add esp, 0xc
inc edi
sub ebp, ecx
cmp edi, eax
jle 0x4da1ba
lea ecx, [esp + 0x78]
mov dword [esp + 0x498], 0xffffffff
call fcn.004bc350
push ebx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 1
jmp 0x4da28c
movsx ecx, word [esp + 0x16]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jg 0x4da279
movsx eax, word [esp + 0x14]
sub eax, esi
inc eax
imul eax, edx
add edi, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edi
push 0
push ebp
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
add esp, 0xc
push ecx
mov ecx, dword [esp + 0x24]
push edi
push esi
call fcn.004bc3a0
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__write]
movsx eax, word [esp + 0x22]
mov edx, dword [esp + 0x34]
add esp, 0xc
inc edi
sub ebp, edx
cmp edi, eax
mov dword [esp + 0x1c], edi
jle 0x4da239
push ebx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 1
jmp 0x4da28c
xor eax, eax
mov ecx, dword [esp + 0x490]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48c
ret 0xc