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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x1013d070]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 4]
push ebx
push esi
push edi
mov esi, dword [eax + 4]
mov ebx, edx
mov dword [esp + 0x24], ecx
mov eax, dword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 0x18]
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x18], ecx
mov eax, dword [eax + 4]
mov edi, dword [eax + 0x20]
cmp edi, ecx
mov eax, ecx
cmovl eax, edi
mov dword [esp + 0x2c], eax
mov eax, edi
cdq
mov esi, edx
mov dword [esp + 0x20], eax
push esi
push eax
push 0
push ebx
mov dword [esp + 0x40], esi
call fcn.100af620
mov ebx, eax
mov dword [esp + 0x44], edx
xor eax, eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x10], eax
cmp edi, dword [esp + 0x18]
je 0x1004d1bb
mov ecx, dword [esp + 0x1c]
mov edi, 8
cmp byte [ecx + 0xc], al
cmovne eax, edi
mov dword [esp + 0x10], eax
mov edi, ebx
mov ecx, edx
sub edi, dword [esp + 0x20]
mov dword [esp + 0x28], edi
sbb ecx, esi
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x1004d3b0
cmp ecx, edx
jg 0x1004d3b0
jl 0x1004d1e7
cmp edi, ebx
jae 0x1004d3b0
mov eax, dword [esp + 0x18]
cdq
push ebx
push edx
push eax
push ecx
push edi
mov dword [esp + 0x6c], 0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], edx
call fcn.10108660
mov dword [esp + 0x50], ebx
pop ebx
mov dword [esp + 0x48], ecx
lea ecx, [eax + 1]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x54], edx
xor edx, edx
mov eax, dword [eax + 4]
mov esi, dword [eax + 4]
mov eax, dword [0x1013da9c]
div dword [esi + 0x20]
inc eax
cmp ecx, eax
je 0x1004d387
push 0
lea eax, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x24]
push ecx
push eax
mov eax, dword [eax + 0xcc]
call eax
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x1004d32f
mov esi, dword [esp + 0x58]
test byte [esi + 0x1c], 4
mov ecx, dword [esi + 0x14]
je 0x1004d2a3
mov eax, dword [ecx + 0x18]
cmp eax, dword [esi + 0x18]
jb 0x1004d2a3
cmp dword [ecx + 0x60], ebx
je 0x1004d29b
mov ecx, esi
call fcn.1003a2b0
test eax, eax
je 0x1004d291
mov ecx, esi
call fcn.1003cf10
mov esi, dword [esp + 0x58]
mov ebx, eax
mov dword [esp + 0x10], eax
jmp 0x1004d2d8
xor eax, eax
mov dword [esp + 0x10], eax
mov ebx, eax
jmp 0x1004d2d8
xor eax, eax
mov dword [esp + 0x10], eax
jmp 0x1004d2dc
mov ebx, dword [ecx + 0x28]
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x1004d333
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, esi
jbe 0x1004d2c9
call fcn.1003e620
jmp 0x1004d2ce
call fcn.1003e540
mov esi, dword [esp + 0x58]
mov ebx, eax
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x1004d333
push dword [esp + 0x2c]
mov ebx, dword [esp + 0x18]
push dword [esp + 0x34]
mov esi, dword [esi + 4]
push dword [esp + 0x28]
add esi, dword [esp + 0x54]
push ebx
push edi
call fcn.10108300
add eax, dword [esp + 0x38]
push eax
push esi
call fcn.100e58b0
mov eax, dword [esp + 0x64]
add esp, 0xc
mov eax, dword [eax + 8]
mov byte [eax], 0
mov eax, edi
or eax, ebx
jne 0x1004d32f
cmp dword [ebp + 0xc], eax
jne 0x1004d32f
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x2c]
bswap eax
mov dword [esi + 0x1c], eax
mov esi, dword [esp + 0x58]
test esi, esi
je 0x1004d387
test byte [esi + 0x1c], 0x20
je 0x1004d380
mov eax, dword [esi + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [esi + 0x10], ecx
mov edi, dword [eax + 0x3c]
mov dword [eax + 0x88], esi
push dword [esi + 4]
mov eax, dword [eax + 0x98]
mov ecx, dword [esi + 0x18]
mov ebx, dword [edi]
dec ecx
cdq
push edx
push eax
push 0
push ecx
call fcn.100af620
push edx
push eax
mov eax, dword [ebx + 0x48]
push edi
call eax
mov edi, dword [esp + 0x38]
add esp, 0x10
jmp 0x1004d387
mov ecx, esi
call fcn.10038a10
add edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
adc ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x1004d3b0
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
jmp 0x1004d1d5
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100ae9aa
mov esp, ebp
pop ebp
ret