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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xcc
mov eax, dword [esp + 0xec]
mov ebp, dword [esp + 0xe0]
mov eax, dword [eax + 0x18]
mov edx, eax
and edx, 0x800
test ah, 4
je 0x4d7dd0
xor ecx, ecx
test edx, edx
mov dword [esp + 0x2c], 2
sete cl
mov dword [esp + 0x14], 0x4d1b50
mov dword [esp + 0x5c], 2
mov dword [esp + 0x50], ecx
test edx, edx
je 0x4d7e01
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x4c], 1
mov dword [esp + 0x1c], 0x4d2060
mov dword [esp + 0x54], 4
add ecx, dword [esp + 0x2c]
mov edx, dword [ebp + 4]
mov eax, dword [ebp]
mov ebx, dword [ebp + 8]
add ecx, edx
test eax, eax
je 0x4d7db1
cmp ecx, ebx
jbe 0x4d7ec9
cmp ebx, 0x1f
jbe 0x4d7ea0
cmp ebx, 0x1fff
ja 0x4d8765
lea edx, [ebx + ebx]
jmp 0x4d7ea5
test ah, 0x10
je 0x4d7e30
xor ecx, ecx
test ah, 0x20
mov dword [esp + 0x2c], 2
sete cl
test edx, edx
mov dword [esp + 0x14], 0x4d1bc0
mov dword [esp + 0x50], ecx
mov dword [esp + 0x5c], 2
jne 0x4d7d77
test ah, 0x20
je 0x4d85e0
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x4c], 1
mov dword [esp + 0x1c], 0x4d1ac0
mov dword [esp + 0x54], 4
jmp 0x4d7d96
mov edi, eax
and edi, 0x100
mov dword [esp + 0x50], edi
jne 0x4d8782
test edx, edx
jne 0x4d8ade
and eax, 0x2000
mov dword [esp + 0x50], eax
je 0x4d85c6
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x50], 0
mov dword [esp + 0x2c], 2
mov dword [esp + 0x4c], 1
mov dword [esp + 0x14], 0x4d1bc0
mov dword [esp + 0x5c], 2
mov dword [esp + 0x1c], 0x4d1ac0
mov dword [esp + 0x54], 4
jmp 0x4d7d96
mov edx, 0x20
cmp ecx, edx
mov ebx, edx
mov dword [esp], eax
cmovae ebx, ecx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
je 0x4d8722
mov edx, dword [ebp + 4]
mov dword [ebp], eax
mov dword [ebp + 8], ebx
sub ebx, dword [esp + 0x2c]
lea edi, [eax + edx]
mov dword [esp + 0x44], 0
mov dword [esp + 0x24], edi
add eax, ebx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xe8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xe4]
mov dword [esp + 4], eax
lea eax, [esp + 0x68]
mov dword [esp], eax
mov eax, dword [esp + 0x1c]
call eax
test eax, eax
mov dword [esp + 0x20], eax
je 0x4d8bcc
movzx eax, byte [esp + 0x50]
mov edi, dword [esp + 0x68]
and eax, 1
mov byte [esp + 0x5b], al
mov eax, dword [esp + 0x20]
test eax, eax
js 0x4d8467
mov dword [esp + 0x48], ebp
mov esi, dword [esp + 0x54]
cmp dword [esp + 0x20], esi
je 0x4d84c0
cmp byte [esp + 0x5b], 0
mov eax, dword [esp + 0xe4]
mov dword [esp + 0x18], eax
jne 0x4d84c0
mov eax, dword [esp + 0x20]
add dword [esp + 0xe4], eax
sub dword [esp + 0xe8], eax
lea eax, [edi - 0xac00]
cmp eax, 0x2ba3
jbe 0x4d8bf6
mov eax, edi
shr eax, 8
cmp eax, 0x1d2
ja 0x4d7fa0
cmp byte [eax + 0x5f7b20], 0
je 0x4d7fa0
cmp edi, 0x1d244
jbe 0x4d8980
lea esi, [esi]
lea eax, [edi - 0xf900]
cmp eax, 0x1ff
jbe 0x4d8060
lea eax, [edi - 0x2000]
cmp eax, 0xfff
jbe 0x4d8060
lea eax, [edi - 0x2f800]
xor ebx, ebx
cmp eax, 0x2ff
jbe 0x4d8062
lea eax, [edi - 0x1109a]
and eax, 0xfffffffd
je 0x4d8060
cmp edi, 0x110ab
je 0x4d8060
lea eax, [esp + 0x70]
mov dword [esp + 0x40], 0xfffffffa
mov dword [esp + 0x38], 0xfffffffb
mov dword [esp + 0x34], 0xfffffffc
mov dword [esp + 0x30], 0xfffffffd
mov dword [esp + 0x28], 0xfffffffe
mov dword [esp + 0x10], 0xffffffff
mov ebp, 0x1e5d
mov esi, 0x3a2
xor ecx, ecx
mov edx, 0x3a2
jmp 0x4d804c
lea ecx, [edx + 1]
cmp esi, ecx
jl 0x4d8062
lea edx, [esi + ecx]
mov ebp, edx
sar ebp, 1
lea ebp, [ebp + ebp*2]
mov ebp, dword [ebp*4 + 0x5f43c0]
sar edx, 1
cmp edi, ebp
ja 0x4d8033
jae 0x4d87b5
lea esi, [edx - 1]
jmp 0x4d8036
xor ebx, ebx
lea eax, [esp + 0x6c]
mov esi, dword [esp + 0xe4]
mov dword [esp + 0x10], eax
jmp 0x4d8120
cmp ebx, 1
je 0x4d8115
cmp edx, dword [esp + 0x7c]
jl 0x4d84d0
cmp ebx, 2
je 0x4d8115
cmp dword [esp + 0x84], edx
jg 0x4d84e0
cmp ebx, 3
je 0x4d8115
cmp edx, dword [esp + 0x8c]
jl 0x4d85a0
cmp ebx, 4
je 0x4d8115
cmp dword [esp + 0x94], edx
jg 0x4d8610
cmp ebx, 5
je 0x4d8115
cmp dword [esp + 0x9c], edx
jg 0x4d8620
cmp ebx, 6
je 0x4d8115
cmp edx, dword [esp + 0xa4]
jl 0x4d8950
cmp ebx, 7
je 0x4d8115
cmp edx, dword [esp + 0xac]
jl 0x4d8960
cmp ebx, 9
jne 0x4d8970
cmp edx, dword [esp + 0xb4]
jl 0x4d8aa1
mov dword [esp + ebx*8 + 0x74], edx
mov dword [esp + ebx*8 + 0x70], ecx
add ebx, 1
mov eax, dword [esp + 0xe8]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
mov eax, dword [esp + 0x1c]
call eax
test eax, eax
jle 0x4d8294
mov ecx, dword [esp + 0x6c]
cmp ecx, 0x1d244
ja 0x4d8294
mov edx, ecx
mov ebp, ecx
shr edx, 8
shr ebp, 4
movzx edx, byte [edx + 0x5f6f80]
and ebp, 0xf
shl edx, 4
movzx edx, byte [ebp + edx + 0x5f7160]
mov ebp, ecx
and ebp, 0xf
shl edx, 4
cmp ebx, 9
movzx edx, byte [ebp + edx + 0x5f73e0]
jg 0x4d8294
test edx, edx
je 0x4d8294
add esi, eax
sub dword [esp + 0xe8], eax
test ebx, ebx
je 0x4d8115
cmp dword [esp + 0x74], edx
jle 0x4d8080
xor eax, eax
mov ebp, dword [esp + ebx*8 + 0x6c]
mov edi, dword [esp + ebx*8 + 0x68]
mov dword [esp + ebx*8 + 0x74], ebp
lea ebp, [ebx - 1]
mov dword [esp + ebx*8 + 0x70], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x64]
mov edi, dword [esp + ebx*8 + 0x60]
mov dword [esp + ebx*8 + 0x6c], ebp
lea ebp, [ebx - 2]
mov dword [esp + ebx*8 + 0x68], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x5c]
mov edi, dword [esp + ebx*8 + 0x58]
mov dword [esp + ebx*8 + 0x64], ebp
lea ebp, [ebx - 3]
mov dword [esp + ebx*8 + 0x60], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x54]
mov edi, dword [esp + ebx*8 + 0x50]
mov dword [esp + ebx*8 + 0x5c], ebp
lea ebp, [ebx - 4]
mov dword [esp + ebx*8 + 0x58], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x4c]
mov edi, dword [esp + ebx*8 + 0x48]
mov dword [esp + ebx*8 + 0x54], ebp
lea ebp, [ebx - 5]
mov dword [esp + ebx*8 + 0x50], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x44]
mov edi, dword [esp + ebx*8 + 0x40]
mov dword [esp + ebx*8 + 0x4c], ebp
lea ebp, [ebx - 6]
mov dword [esp + ebx*8 + 0x48], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x3c]
mov edi, dword [esp + ebx*8 + 0x38]
mov dword [esp + ebx*8 + 0x44], ebp
lea ebp, [ebx - 7]
mov dword [esp + ebx*8 + 0x40], edi
cmp ebp, eax
jle 0x4d8287
mov ebp, dword [esp + ebx*8 + 0x34]
mov edi, dword [esp + ebx*8 + 0x30]
mov dword [esp + ebx*8 + 0x3c], ebp
lea ebp, [ebx - 8]
mov dword [esp + ebx*8 + 0x38], edi
cmp ebp, eax
jle 0x4d8287
mov edi, dword [esp + 0x70]
mov ebp, dword [esp + 0x74]
xor eax, eax
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], ebp
mov dword [esp + eax*8 + 0x74], edx
mov dword [esp + eax*8 + 0x70], ecx
jmp 0x4d811d
mov ebp, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xe4], esi
test eax, eax
je 0x4d8630
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x20]
cmp dword [esp + 0x3c], eax
jb 0x4d84f0
cmp dword [esp + 0x20], 2
je 0x4d8539
jle 0x4d85b2
mov eax, dword [esp + 0x20]
cmp eax, 3
je 0x4d82f5
cmp eax, 4
jne 0x4d8327
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
movzx eax, byte [edi]
mov byte [esi], al
lea eax, [edi + 1]
mov dword [esp + 0x18], eax
lea eax, [esi + 1]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea ecx, [eax + 1]
movzx eax, byte [eax]
lea edx, [edi + 1]
mov byte [edi], al
lea eax, [ecx + 1]
movzx ecx, byte [ecx]
mov dword [esp + 0x18], eax
lea eax, [edx + 1]
mov byte [edx], cl
lea edi, [eax + 1]
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x18]
movzx edx, byte [edi]
mov byte [eax], dl
test ebx, ebx
je 0x4d8447
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x28], ebp
imul eax, dword [esp + 0xe8]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x70]
lea ebx, [eax + ebx*8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x3c]
mov eax, dword [eax]
mov ecx, ebp
mov ebp, esi
mov esi, ecx
mov dword [esp + 0x68], eax
jmp 0x4d83a5
cmp ebx, 0x1fff
ja 0x4d83e3
add ebx, ebx
cmp ecx, ebx
mov dword [esp], eax
cmovae ebx, ecx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
je 0x4d8720
mov ebp, dword [esi + 4]
mov dword [esi], eax
mov dword [esi + 8], ebx
sub ebx, edi
add ebp, eax
add ebx, eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
mov eax, ebx
mov dword [esp], ebp
sub eax, ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
jne 0x4d8420
mov ebx, dword [esi + 8]
mov eax, dword [esi]
lea ecx, [ebx + edi]
add ecx, dword [esp + 0x10]
sub ebp, eax
mov dword [esi + 4], ebp
cmp ebx, ecx
jb 0x4d83d7
test eax, eax
jne 0x4d839b
cmp ebx, 0x1f
ja 0x4d8370
mov ebx, 0x20
jmp 0x4d837a
mov ebp, ebx
shr ebp, 2
add ebx, ebp
jae 0x4d837a
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esi], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x4d874e
mov ecx, esi
add dword [esp + 0x18], 8
mov esi, ebp
add esi, eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
mov ebp, ecx
jne 0x4d8362
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x24], esi
mov dword [esp + 0x3c], ebx
test ebp, ebp
je 0x4d8bc8
mov edi, dword [esp + 0x6c]
test ebp, ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x68], edi
jns 0x4d7f31
mov ebp, dword [esp + 0x48]
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
imul esi, dword [esp + 0xe8]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x24]
sub eax, esi
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
je 0x4d8b59
add esi, eax
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], esi
sub dword [esp + 0xe4], eax
add dword [esp + 0xe8], eax
jmp 0x4d7ee2
mov dword [esp + 0x18], 0
jmp 0x4d7f55
mov eax, 1
jmp 0x4d81b1
mov eax, 2
jmp 0x4d81b1
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
imul ecx, dword [esp + 0xe8]
mov eax, dword [esi]
mov edx, dword [esi + 8]
sub edi, eax
mov dword [esi + 4], edi
mov esi, dword [esp + 0x2c]
add esi, edx
add ecx, esi
cmp edx, ecx
jb 0x4d8550
test eax, eax
je 0x4d8550
sub edx, dword [esp + 0x2c]
add edi, eax
mov dword [esp + 0x24], edi
add eax, edx
cmp dword [esp + 0x20], 2
mov dword [esp + 0x3c], eax
jne 0x4d82c6
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
jmp 0x4d8308
cmp edx, 0x1f
jbe 0x4d87ab
cmp edx, 0x1fff
ja 0x4d8b1a
add edx, edx
cmp ecx, edx
mov dword [esp], eax
cmovae edx, ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], edx
call sub.msvcrt.dll_realloc
test eax, eax
mov edx, dword [esp + 0x10]
je 0x4d8e4a
mov edi, dword [esp + 0x48]
mov dword [edi], eax
mov dword [edi + 8], edx
mov edi, dword [edi + 4]
jmp 0x4d851e
mov eax, 3
cmp eax, ebx
jl 0x4d81b1
jmp 0x4d8115
cmp dword [esp + 0x20], 1
mov eax, dword [esp + 0x24]
je 0x4d8317
jmp 0x4d8327
mov dword [esp + 0x2c], 1
mov dword [esp + 0x5c], 1
mov dword [esp + 0x14], 0x4d1930
nop
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x1c], fcn.004d4ee0
mov dword [esp + 0x54], 6
imul ecx, eax
mov dword [esp + 0x4c], eax
jmp 0x4d7d96
mov eax, 4
jmp 0x4d85a5
mov eax, 5
jmp 0x4d85a5
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x18], ebx
imul eax, dword [esp + 0xe8]
mov dword [esp + 0x20], ebp
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x10], eax
jmp 0x4d8692
cmp ebx, 0x1fff
ja 0x4d86e0
add ebx, ebx
cmp ecx, ebx
mov dword [esp], eax
cmovae ebx, ecx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
je 0x4d8722
mov esi, dword [ebp + 4]
mov dword [ebp], eax
mov dword [ebp + 8], ebx
sub ebx, edi
add esi, eax
add ebx, eax
mov eax, dword [esp + 0x68]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, ebx
sub eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
jne 0x4d8ac7
mov eax, dword [ebp]
mov ebx, dword [ebp + 8]
sub esi, eax
lea ecx, [ebx + edi]
add ecx, dword [esp + 0x10]
test eax, eax
mov dword [ebp + 4], esi
je 0x4d86cd
cmp ebx, ecx
jae 0x4d868c
cmp ebx, 0x1f
ja 0x4d8660
mov ebx, 0x20
jmp 0x4d866a
mov esi, ebx
shr esi, 2
add ebx, esi
jae 0x4d866a
mov edx, eax
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [ebp], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x4d874e
mov ebp, esi
mov eax, dword [ebp]
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebp], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x44]
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, ebx
shr edx, 2
add edx, ebx
jae 0x4d7ea5
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
jmp 0x4d8733
xor ecx, ecx
test ah, 2
mov dword [esp + 0x2c], 1
sete cl
mov dword [esp + 0x14], 0x4d1930
mov dword [esp + 0x5c], 1
mov dword [esp + 0x50], ecx
jmp 0x4d7d6f
mov edx, 0x20
jmp 0x4d8567
lea edx, [edx + edx*2]
cmp ebx, 0xa
lea edx, [edx*4 + 0x5f43c0]
mov edi, dword [edx + 4]
mov ebp, dword [edx + 8]
je 0x4d8062
test ebx, ebx
je 0x4d8887
mov esi, dword [esp + 0x10]
mov edx, dword [eax - 8]
mov ecx, dword [eax - 4]
test esi, esi
mov dword [eax], edx
mov dword [eax + 4], ecx
je 0x4d8887
mov ecx, dword [eax - 0xc]
mov edx, dword [eax - 0x10]
mov dword [eax - 4], ecx
mov ecx, dword [esp + 0x28]
mov dword [eax - 8], edx
test ecx, ecx
je 0x4d8887
mov edx, dword [eax - 0x18]
mov ecx, dword [eax - 0x14]
mov dword [eax - 0x10], edx
mov edx, dword [esp + 0x30]
mov dword [eax - 0xc], ecx
test edx, edx
je 0x4d8887
mov esi, dword [esp + 0x34]
mov edx, dword [eax - 0x20]
mov ecx, dword [eax - 0x1c]
test esi, esi
mov dword [eax - 0x18], edx
mov dword [eax - 0x14], ecx
je 0x4d8887
mov ecx, dword [eax - 0x24]
mov edx, dword [eax - 0x28]
mov dword [eax - 0x1c], ecx
mov ecx, dword [esp + 0x38]
mov dword [eax - 0x20], edx
test ecx, ecx
je 0x4d8887
mov edx, dword [eax - 0x30]
mov ecx, dword [eax - 0x2c]
mov dword [eax - 0x28], edx
mov edx, dword [esp + 0x40]
mov dword [eax - 0x24], ecx
test edx, edx
je 0x4d8887
mov edx, dword [eax - 0x38]
mov ecx, dword [eax - 0x34]
cmp ebx, 7
mov dword [eax - 0x30], edx
mov dword [eax - 0x2c], ecx
je 0x4d8887
mov edx, dword [eax - 0x40]
mov ecx, dword [eax - 0x3c]
cmp ebx, 9
mov dword [eax - 0x38], edx
mov dword [eax - 0x34], ecx
jne 0x4d8887
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], ecx
xor ecx, ecx
cmp ebp, 0x1d244
ja 0x4d88c0
mov ecx, ebp
mov esi, ebp
shr ecx, 8
shr esi, 4
movzx ecx, byte [ecx + 0x5f6f80]
and esi, 0xf
shl ecx, 4
movzx ecx, byte [esi + ecx + 0x5f7160]
mov esi, ebp
and esi, 0xf
shl ecx, 4
movzx ecx, byte [esi + ecx + 0x5f73e0]
lea edx, [edi - 0x2000]
add ebx, 1
mov dword [esp + 0x74], ecx
mov dword [esp + 0x70], ebp
mov dword [esp + 0x68], edi
cmp edx, 0xfff
jbe 0x4d8940
lea edx, [edi - 0xf900]
cmp edx, 0x1ff
jbe 0x4d8940
lea edx, [edi - 0x2f800]
cmp edx, 0x2ff
jbe 0x4d8940
lea edx, [edi - 0x1109a]
add eax, 8
add dword [esp + 0x10], 1
add dword [esp + 0x28], 1
mov dword [esp + 0x18], 0
add dword [esp + 0x30], 1
add dword [esp + 0x34], 1
add dword [esp + 0x38], 1
add dword [esp + 0x40], 1
and edx, 0xfffffffd
je 0x4d8940
cmp edi, 0x110ab
jne 0x4d8020
lea esi, [esi]
mov dword [esp + 0x18], 0
jmp 0x4d8062
mov eax, 6
jmp 0x4d85a5
mov eax, 7
jmp 0x4d85a5
mov eax, 8
jmp 0x4d85a5
movzx eax, byte [eax + 0x5f6f80]
mov edx, edi
shr edx, 4
and edx, 0xf
shl eax, 4
movzx eax, byte [edx + eax + 0x5f7160]
mov edx, edi
and edx, 0xf
shl eax, 4
cmp byte [edx + eax + 0x5f73e0], 0
je 0x4d7fa0
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x48]
test edi, edi
je 0x4d8ed9
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add eax, edi
cmp dword [esp + 0x3c], eax
jae 0x4d8a18
mov eax, edi
sub eax, dword [ebp]
mov edx, dword [esp + 0x4c]
imul edx, dword [esp + 0xe8]
mov edi, dword [esp + 0x2c]
mov dword [ebp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], ebp
add eax, edi
add eax, edx
mov dword [esp + 4], eax
call fcn.004d7c70
test eax, eax
je 0x4d874e
mov eax, dword [ebp]
mov esi, dword [ebp + 4]
add esi, eax
sub eax, edi
add eax, dword [ebp + 8]
mov dword [esp + 0x24], esi
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x20], 2
je 0x4d8a6d
jle 0x4d8ec9
mov eax, dword [esp + 0x20]
cmp eax, 3
je 0x4d8a52
cmp eax, 4
jne 0x4d7ee2
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
movzx eax, byte [edi]
mov byte [esi], al
lea eax, [edi + 1]
mov dword [esp + 0x18], eax
lea eax, [esi + 1]
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
movzx eax, byte [edi]
mov byte [esi], al
lea eax, [edi + 1]
mov dword [esp + 0x18], eax
lea eax, [esi + 1]
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
movzx eax, byte [edi]
mov byte [esi], al
lea eax, [edi + 1]
mov dword [esp + 0x18], eax
lea eax, [esi + 1]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
movzx eax, byte [eax]
mov byte [edi], al
lea eax, [edi + 1]
mov dword [esp + 0x24], eax
jmp 0x4d7ee2
mov edi, dword [esp + 0xb0]
mov ebp, dword [esp + 0xb4]
mov eax, 8
mov dword [esp + 0xb8], edi
mov dword [esp + 0xbc], ebp
jmp 0x4d8287
add esi, eax
mov dword [esp + 0x3c], ebx
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x24], esi
jmp 0x4d8327
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x2c], 2
mov dword [esp + 0x4c], 1
mov dword [esp + 0x14], 0x4d1b50
mov dword [esp + 0x5c], 2
mov dword [esp + 0x1c], 0x4d2060
mov dword [esp + 0x54], 4
jmp 0x4d7d96
mov edi, edx
shr edi, 2
add edx, edi
jae 0x4d8567
mov ebp, dword [esp + 0x48]
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebp], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x4d874e
mov edi, dword [ebp]
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x2c]
sub esi, edi
lea ecx, [ebx + eax]
add ecx, dword [esp + 0x10]
test edi, edi
mov dword [ebp + 4], esi
je 0x4d8b77
cmp ebx, ecx
jae 0x4d8bb2
cmp ebx, 0x1f
jbe 0x4d8db0
cmp ebx, 0x1fff
ja 0x4d8dba
add ebx, ebx
cmp ecx, ebx
mov dword [esp], edi
cmovae ebx, ecx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
mov edi, eax
je 0x4d8722
mov esi, dword [ebp + 4]
mov dword [ebp], eax
mov dword [ebp + 8], ebx
sub ebx, dword [esp + 0x2c]
add esi, edi
lea eax, [edi + ebx]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x3c], eax
jmp 0x4d847f
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov eax, edi
sub eax, dword [ebp]
cmp dword [esp + 0x5c], 2
mov dword [ebp + 4], eax
mov byte [edi], 0
jne 0x4d8756
mov edx, dword [ebp]
mov eax, dword [ebp + 4]
mov byte [edx + eax + 1], 0
jmp 0x4d8756
mov edx, 0xdee95c4d
mov esi, eax
mov edi, dword [esp + 0x4c]
mul edx
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
imul edi, dword [esp + 0xe8]
mov eax, edx
shr eax, 9
add eax, 0x1100
mov dword [esp + 0x68], eax
mov dword [esp + 0x10], edi
mov edi, ebp
mov ebp, dword [esp + 0x24]
jmp 0x4d8c67
cmp ebx, 0x1fff
ja 0x4d8cab
add ebx, ebx
cmp ebp, ebx
mov dword [esp], ecx
cmovae ebx, ebp
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
mov ecx, eax
je 0x4d8ec2
mov dword [edi], eax
mov eax, dword [edi + 4]
mov dword [edi + 8], ebx
sub ebx, dword [esp + 0x2c]
lea ebp, [ecx + eax]
mov eax, dword [esp + 0x68]
add ebx, ecx
mov dword [esp + 8], eax
mov eax, ebx
mov dword [esp], ebp
sub eax, ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
jne 0x4d8cc0
mov ebx, dword [edi + 8]
mov edx, dword [esp + 0x2c]
mov eax, ebp
mov ecx, dword [edi]
lea ebp, [ebx + edx]
add ebp, dword [esp + 0x10]
sub eax, ecx
mov dword [edi + 4], eax
cmp ebx, ebp
jb 0x4d8c9f
test ecx, ecx
jne 0x4d8c5a
cmp ebx, 0x1f
ja 0x4d8c2d
mov ebx, 0x20
jmp 0x4d8c37
mov eax, ebx
shr eax, 2
add ebx, eax
jae 0x4d8c37
mov edx, ecx
mov ebp, edi
jmp 0x4d86eb
mov ecx, ebp
mov edx, 0xdee95c4d
mov ebp, edi
add ecx, eax
mov eax, esi
mov edi, esi
mul edx
mov dword [esp + 0x3c], ebx
mov eax, edx
mov edx, 0x24924925
shr eax, 9
imul eax, eax, 0x24c
sub edi, eax
mov eax, edi
shr eax, 2
mul edx
lea eax, [edx + 0x1161]
mov dword [esp + 0x68], eax
jmp 0x4d8d3d
cmp ebx, 0x1fff
ja 0x4d8d95
add ebx, ebx
cmp edx, ebx
mov dword [esp], edi
cmovae ebx, edx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
mov edi, eax
je 0x4d8722
mov ecx, dword [ebp + 4]
mov dword [ebp], eax
mov dword [ebp + 8], ebx
sub ebx, dword [esp + 0x2c]
add ecx, edi
lea eax, [edi + ebx]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], ecx
mov dword [esp + 0x18], ecx
sub eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
mov ecx, dword [esp + 0x18]
jne 0x4d8df5
mov edi, dword [ebp]
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x2c]
sub ecx, edi
lea edx, [ebx + eax]
add edx, dword [esp + 0x10]
test edi, edi
mov dword [ebp + 4], ecx
je 0x4d8d82
cmp ebx, edx
jae 0x4d8d2c
cmp ebx, 0x1f
ja 0x4d8cfa
mov ebx, 0x20
jmp 0x4d8d08
mov eax, ebx
shr eax, 2
add ebx, eax
jae 0x4d8d08
mov edx, edi
jmp 0x4d86eb
mov ebx, 0x20
jmp 0x4d8b8e
mov eax, ebx
shr eax, 2
add ebx, eax
jae 0x4d8b8e
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [esp], edi
call sub.msvcrt.dll_free
mov dword [ebp], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x4d874e
mov ebx, eax
mov eax, esi
mov edx, 0x24924925
shr eax, 2
add ebx, ecx
mul edx
mov eax, esi
mov dword [esp + 0x24], ebx
imul edx, edx, 0x1c
sub eax, edx
add eax, 0x11a7
cmp eax, 0x11a7
je 0x4d7ee2
mov dword [esp + 0x68], eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], ebx
sub eax, ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
je 0x4d8e53
add ebx, eax
mov dword [esp + 0x24], ebx
jmp 0x4d7ee2
mov ebp, dword [esp + 0x48]
jmp 0x4d8722
mov esi, dword [ebp]
mov eax, dword [ebp + 8]
mov edi, dword [esp + 0x2c]
sub ebx, esi
mov dword [ebp + 4], ebx
lea ebx, [eax + edi]
add ebx, dword [esp + 0x10]
test esi, esi
je 0x4d8e71
cmp eax, ebx
jae 0x4d8eaa
cmp eax, 0x1f
jbe 0x4d8f4e
cmp eax, 0x1fff
ja 0x4d8f13
add eax, eax
cmp ebx, eax
mov dword [esp], esi
cmovb ebx, eax
mov dword [esp + 4], ebx
call sub.msvcrt.dll_realloc
test eax, eax
je 0x4d8722
mov dword [ebp], eax
mov esi, eax
mov dword [ebp + 8], ebx
mov eax, ebx
sub eax, dword [esp + 0x2c]
mov ebx, dword [ebp + 4]
add ebx, esi
add eax, esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x68]
jmp 0x4d8e24
mov ebp, edi
jmp 0x4d8722
cmp dword [esp + 0x20], 1
je 0x4d8a88
jmp 0x4d7ee2
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x24]
imul ebx, dword [esp + 0xe8]
mov eax, dword [esp + 0x68]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x3c]
sub eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
call eax
test eax, eax
je 0x4d8f58
add esi, eax
mov dword [esp + 0x24], esi
jmp 0x4d7ee2
mov edx, eax
shr edx, 2
add eax, edx
jae 0x4d8e87
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [ebp], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x4d874e
mov eax, 0x20
jmp 0x4d8e87
mov eax, dword [ebp + 8]
mov edi, dword [esp + 0x2c]
sub esi, dword [ebp]
add eax, edi
add eax, ebx
mov dword [ebp + 4], esi
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004d7c70
test eax, eax
je 0x4d874e
mov eax, dword [ebp]
mov esi, dword [ebp + 4]
add esi, eax
sub eax, edi
add eax, dword [ebp + 8]
mov dword [esp + 0x3c], eax
jmp 0x4d8ee9