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

Disassembly:
sub esp, 0x78
push ebx
push ebp
mov ebp, dword [esp + 0x84]
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x30], 0xffffffff
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp]
mov dword [esp + 0x20], 1
mov dword [esp + 0x3c], edi
movzx eax, byte [edi + 0x10]
mov dword [esp + 0x18], edx
lea ecx, [eax + eax*8]
mov eax, dword [edx + 4]
lea ecx, [ecx + 1]
lea esi, [eax + ecx*8]
mov eax, dword [ebp + 4]
mov ebp, dword [esi + 0x44]
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
test ebp, ebp
jne 0x4f4a0a
test byte [ecx + 0x24], 0x80
je 0x4f49a2
mov ebp, dword [ecx + 8]
jmp 0x4f4a0a
push 0x48
lea eax, [esp + 0x44]
push 0
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x3c]
mov dword [esp + 0x50], eax
add esp, 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x72], 0x10001
mov dword [esp + 0x48], eax
mov byte [esp + 0x76], 5
mov dword [esp + 0x4c], ecx
movzx eax, word [ecx + 0x30]
or dword [esp + 0x78], 3
mov word [esp + 0x70], ax
movzx eax, word [ecx + 0x2e]
mov word [esp + 0x28], ax
xor eax, eax
mov word [esp + 0x2a], ax
test byte [esi + 0x28], 1
jne 0x4f4a06
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 0x54], eax
lea ebp, [esp + 0x40]
movzx eax, word [ecx + 0x2e]
mov dword [esp + 0x2c], eax
cmp ax, 0xa
jg 0x4f4a1c
xor eax, eax
jmp 0x4f4a33
cwde
cdq
push edx
push eax
call fcn.004c2bb0
mov ecx, dword [esp + 0x1c]
add esp, 8
sub ax, 0x21
movzx eax, ax
mov esi, dword [esp + 0x8c]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
cmp dword [esi + 0x10], ebx
jne 0x4f4ba0
mov eax, dword [esp + 0x18]
test byte [eax + 0x28], 0x20
jne 0x4f4ba0
mov eax, dword [eax]
mov eax, dword [eax]
mov eax, dword [eax + 0x20]
and eax, 0x8000
or eax, 0
je 0x4f4ba0
cmp dword [edx + 0x44], ebx
jne 0x4f4ba0
mov eax, dword [edx + 0x28]
test al, 1
jne 0x4f4ba0
test byte [ecx + 0x24], 0x80
jne 0x4f4ba0
test al, 0x28
jne 0x4f4ba0
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
lea eax, [eax + eax*2]
shl eax, 4
add eax, esi
mov dword [esp + 0x34], eax
lea ebx, [ebx]
cmp esi, eax
jae 0x4f4b90
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0xc]
and ecx, dword [esi + 0x20]
and eax, dword [esi + 0x24]
or ecx, eax
jne 0x4f4b77
push ecx
push ecx
push edx
push esi
call fcn.004eb2c0
add esp, 0x10
test eax, eax
je 0x4f4b73
mov eax, dword [edi + 0x30]
mov ecx, 1
mov edx, dword [esp + 0x14]
mov word [edi + 0x18], cx
mov dword [edi + 0x28], ecx
mov ecx, dword [esp + 0x24]
mov dword [edi + 0x20], 0
mov dword [eax], esi
mov eax, dword [esp + 0x2c]
add eax, ecx
mov word [edi + 0x12], ax
cmp dword [edx + 0xc], 0
jne 0x4f4b1b
test byte [edx + 0x24], 2
jne 0x4f4b1b
add eax, 0x1c
jmp 0x4f4b1e
add eax, 0xfffffff6
mov word [edi + 0x12], ax
test ax, ax
jge 0x4f4b2d
xor eax, eax
mov word [edi + 0x12], ax
mov eax, 0x2b
push eax
push ecx
mov word [edi + 0x16], ax
call fcn.004c2c50
mov word [edi + 0x14], ax
mov dword [edi + 0x24], 0x4000
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
or ecx, dword [esp + 0x98]
or eax, dword [esp + 0x9c]
push edi
push dword [esp + 0x98]
mov dword [edi], ecx
mov dword [edi + 4], eax
call fcn.004f65c0
add esp, 0x10
mov ebx, eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
add esi, 0x30
test ebx, ebx
je 0x4f4ab0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x78
ret
test ebx, ebx
jne 0x4f4e89
mov esi, dword [esp + 0x8c]
nop
test ebp, ebp
je 0x4f4e89
movzx eax, byte [edx + 0x24]
mov ecx, dword [ebp + 0x24]
shr eax, 5
and eax, 1
test ecx, ecx
je 0x4f4bd6
push ecx
push dword [esp + 0x20]
push eax
push dword [edx + 0x2c]
call fcn.004f8640
mov edx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4f4e70
test dword [ebp + 0x38], 0x100
jne 0x4f4e70
mov eax, dword [ebp + 8]
movzx ebx, word [eax]
xor eax, eax
mov dword [edi + 0x18], eax
mov word [edi + 0x1c], ax
mov dword [edi + 0x28], eax
mov byte [edi + 0x11], al
mov word [edi + 0x12], ax
mov eax, dword [esp + 0x90]
mov dword [edi], eax
mov eax, dword [esp + 0x94]
mov dword [edi + 4], eax
mov word [edi + 0x16], bx
mov dword [edi + 0x20], ebp
push dword [edx + 0x2c]
mov dword [esp + 0x28], ebx
push ebp
push esi
call fcn.00491210
mov edx, eax
add esp, 0xc
mov eax, dword [ebp + 0x38]
mov ecx, eax
and ecx, 3
cmp cl, 3
jne 0x4f4c6a
neg edx
mov dword [edi + 0x24], 0x100
push ebx
sbb dl, dl
lea eax, [ebx + 0x10]
and dl, byte [esp + 0x24]
push edi
push dword [esp + 0x24]
mov byte [edi + 0x11], dl
mov word [edi + 0x14], ax
call fcn.004f6730
push edi
push esi
call fcn.004f65c0
mov word [edi + 0x16], bx
jmp 0x4f4e30
test al, 0x20
je 0x4f4c7b
xor esi, esi
mov dword [edi + 0x24], 0x240
xor ebx, ebx
jmp 0x4f4c9e
mov eax, dword [esp + 0x10]
mov esi, dword [ebp + 0x40]
mov ebx, dword [ebp + 0x44]
and esi, dword [eax + 0x38]
and ebx, dword [eax + 0x3c]
mov eax, esi
or eax, ebx
mov eax, 0x240
je 0x4f4c9b
mov eax, 0x200
mov dword [edi + 0x24], eax
test edx, edx
jne 0x4f4d05
mov ecx, dword [esp + 0x14]
test byte [ecx + 0x24], 0x80
jne 0x4f4d05
cmp dword [ebp + 0x24], edx
jne 0x4f4d05
mov eax, dword [esp + 0x10]
test byte [eax + 0x28], 2
jne 0x4f4d05
mov eax, esi
or eax, ebx
jne 0x4f4e37
test byte [ebp + 0x38], 4
jne 0x4f4e37
mov ax, word [ebp + 0x30]
cmp ax, word [ecx + 0x30]
jge 0x4f4e37
mov eax, dword [esp + 0x18]
test byte [eax + 0x28], 4
jne 0x4f4e37
cmp byte [0x52e2df], dl
je 0x4f4e37
mov eax, dword [eax]
mov eax, dword [eax]
test byte [eax + 0x4c], 0x20
jne 0x4f4e37
neg edx
sbb dl, dl
and dl, byte [esp + 0x20]
mov byte [edi + 0x11], dl
movsx ecx, word [ebp + 0x30]
mov eax, ecx
shl eax, 4
sub eax, ecx
mov ecx, dword [esp + 0x14]
cdq
movsx ecx, word [ecx + 0x30]
idiv ecx
mov ecx, dword [esp + 0x24]
inc eax
add eax, ecx
or esi, ebx
mov word [edi + 0x14], ax
je 0x4f4e10
mov edx, dword [esp + 0x18]
lea eax, [ecx + 0x10]
movzx esi, ax
mov eax, dword [esp + 0x10]
cmp dword [edx + 0x5c], 0
mov ecx, dword [eax + 0x2c]
mov dword [esp + 0x38], ecx
jle 0x4f4da9
xor eax, eax
mov dword [esp + 0x2c], eax
mov edi, eax
lea esp, [esp]
mov ebx, dword [edx + 0x64]
add ebx, eax
push ebp
push ecx
push dword [ebx]
call fcn.004b29b0
add esp, 0xc
test eax, eax
je 0x4f4da5
movzx eax, word [ebx + 8]
test ax, ax
jg 0x4f4d82
add esi, eax
jmp 0x4f4d8c
dec esi
test byte [ebx + 0xc], 0x82
je 0x4f4d8c
sub esi, 0x13
mov edx, dword [esp + 0x18]
inc edi
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
add eax, 0x30
mov dword [esp + 0x2c], eax
cmp edi, dword [edx + 0x5c]
jl 0x4f4d60
mov edi, dword [esp + 0x3c]
movzx ecx, word [edi + 0x14]
movsx edx, cx
cmp cx, si
jl 0x4f4ddd
movsx esi, si
lea eax, [esi + 0x31]
cmp edx, eax
jle 0x4f4dc3
mov eax, ecx
jmp 0x4f4e08
lea eax, [esi + 0x1f]
cmp edx, eax
jle 0x4f4dcf
lea eax, [ecx + 1]
jmp 0x4f4e05
sub edx, esi
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, cx
jmp 0x4f4e05
movsx ecx, si
lea eax, [edx + 0x31]
cmp ecx, eax
jle 0x4f4dec
movzx eax, si
jmp 0x4f4e08
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x4f4df9
inc esi
movzx eax, si
jmp 0x4f4e08
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, si
movzx eax, ax
mov ecx, dword [esp + 0x24]
mov word [edi + 0x14], ax
push ecx
push edi
push dword [esp + 0x24]
call fcn.004f6730
push edi
push dword [esp + 0x9c]
call fcn.004f65c0
mov ecx, dword [esp + 0x38]
mov word [edi + 0x16], cx
add esp, 0x14
test eax, eax
jne 0x4f4e8b
mov eax, dword [esp + 0x8c]
push 0
push ebp
push dword [esp + 0x18]
mov byte [eax + 0x14], 0
push eax
call fcn.004f4ea0
mov esi, dword [esp + 0x9c]
add esp, 0x10
mov edx, dword [esp + 0x10]
mov ebx, eax
cmp byte [esi + 0x14], 1
jne 0x4f4e70
mov ecx, dword [esp + 0x14]
or dword [ecx + 0x24], 0x100
cmp dword [edx + 0x44], 0
je 0x4f4e7a
xor ebp, ebp
jmp 0x4f4e7d
mov ebp, dword [ebp + 0x14]
inc dword [esp + 0x20]
test ebx, ebx
je 0x4f4ba0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret