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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov dword [esp + 0x58], eax
mov dword [esp + 0x68], edx
mov dword [esp + 0x60], ecx
mov ebp, dword [eax]
mov eax, dword [ebp + 8]
mov dword [esp + 0x5c], eax
mov edx, dword [ebp + 0x18]
shr edx, 1
and edx, 1
mov dword [esp + 0x50], edx
test byte [ebp + 4], 0x10
jne 0x4da188
xor eax, eax
cmp dword [ebp + 0x20], 2
setne al
mov dword [esp + 0x6c], eax
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x38], 0
mov eax, dword [esp + 0x60]
add eax, dword [esp + 0x64]
add eax, dword [esp + 0x50]
test eax, eax
jle 0x4da100
mov edx, dword [ebp + 0x38]
mov dword [esp + 0x3c], edx
mov ebx, dword [ebp + 0x60]
mov dword [esp + 0x74], ebx
cmp ebx, dword [esp + 0x60]
jg 0x4da124
mov dword [esp + 0x78], ebx
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x4da138
mov esi, dword [esp + 0x64]
test esi, esi
je 0x4d9ede
mov edx, dword [esp + 0x3c]
mov byte [edx], 0xa
inc edx
mov dword [esp + 0x3c], edx
dec dword [esp + 0x74]
inc dword [esp + 0x48]
mov eax, dword [ebp + 0x20]
lea edx, [esp + 0x78]
mov dword [esp + 4], edx
lea edx, [esp + 0x74]
mov dword [esp], edx
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x3c]
call fcn.004d4718
cmp eax, 1
sbb dword [esp + 0x48], 0xffffffff
mov eax, dword [esp + 0x64]
sub dword [esp + 0x3c], eax
mov edx, dword [esp + 0x74]
add edx, eax
mov dword [esp + 0x74], edx
cmp ebx, edx
jl 0x4da170
mov eax, dword [esp + 0x78]
mov ebx, edx
mov dword [esp + 0x64], 0
add dword [esp + 0x68], eax
sub dword [esp + 0x60], eax
mov dword [esp + 0x54], 0
mov edx, dword [esp + 0x38]
lea eax, [edx + ebx]
lea edx, [esp + 0x80]
mov dword [esp + 0x34], edx
jmp 0x4da047
mov dword [esp + 0x28], 0
lea eax, [esp + 0x70]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x20], eax
lea eax, [edx + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x18], eax
lea eax, [ebp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x30], edx
call fcn.004fb654
mov dword [esp + 0x44], eax
and dword [ebp + 0x18], 0xfffffffe
mov ecx, dword [esp + 0x70]
test eax, eax
mov edx, dword [esp + 0x30]
je 0x4d9fd3
mov eax, dword [esp + 0x7c]
add eax, ecx
test eax, eax
je 0x4da0b4
add ecx, dword [ebx]
mov dword [ebx], ecx
mov eax, dword [ebx + 8]
cmp ecx, eax
jg 0x4da098
mov dword [esp + 0x38], 0
lea ecx, [ebx + 8]
mov edx, dword [esp + 0x48]
mov dword [esp], edx
mov edx, ebx
mov eax, dword [esp + 0x58]
call fcn.004d9c3c
test eax, eax
jne 0x4da158
mov eax, dword [esp + 0x70]
add dword [esp + 0x4c], eax
mov edx, dword [esp + 0x7c]
add dword [esp + 0x3c], edx
mov eax, dword [esp + 0x74]
sub eax, edx
mov dword [esp + 0x74], eax
add eax, dword [esp + 0x38]
jne 0x4da037
mov edx, dword [esp + 0x44]
test edx, edx
jne 0x4da037
mov dword [esp + 0x50], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 1
add eax, dword [esp + 0x50]
test eax, eax
jle 0x4da0d8
mov ebx, dword [ebp + 0x3c]
test ebx, ebx
je 0x4da110
mov eax, dword [ebx]
lea edx, [ebx + eax + 0x10]
mov dword [esp + 0x40], edx
mov edx, dword [ebx + 8]
sub edx, eax
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x4d9f54
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x38]
add dword [ebx], eax
mov dword [esp + 0x40], edi
sub edx, eax
jmp 0x4d9f54
sub ecx, eax
mov dword [esp + 0x38], ecx
mov esi, dword [esp + 0x40]
add esi, edx
mov edi, dword [esp + 0x34]
rep movsb byte es:[edi], byte [esi]
mov dword [ebx], eax
jmp 0x4d9fea
mov eax, dword [esp + 0x74]
sub dword [esp + 0x68], eax
add dword [esp + 0x60], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x38], 0
mov edi, dword [esp + 0x54]
test edi, edi
jne 0x4d9e86
mov esi, dword [esp + 0x4c]
test esi, esi
jne 0x4da100
mov dword [esp], 0x16
call fcn.00504e4c
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x4c]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x60]
call fcn.004d3d2c
mov ebx, eax
mov dword [ebp + 0x3c], eax
jmp 0x4da05e
mov eax, dword [esp + 0x60]
mov dword [esp + 0x78], eax
mov edi, dword [esp + 0x6c]
test edi, edi
jne 0x4d9ec2
mov ecx, dword [esp + 0x78]
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x68]
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x74], ebx
mov eax, ebx
jmp 0x4d9f2d
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x4c]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x74], ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x64], 1
jmp 0x4d9f2d
mov dword [esp + 0x6c], 1
jmp 0x4d9e66