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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
test ecx, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x34], edx
je 0x40ff69
mov dword [esp + 0x24], edx
nop
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov eax, 0x20000
cmp edx, 0x20000
cmovbe eax, edx
mov ebx, eax
mov dword [esp + 0x38], eax
mov eax, esi
add eax, ebx
cmp ebx, 0xf
mov ecx, eax
mov dword [esp + 0x30], eax
jbe 0x410391
mov eax, edx
lea edx, [ebx - 4]
lea ebp, [esi + 1]
sub eax, 0x10
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], 0xffffffff
cmp eax, edx
cmova eax, edx
add eax, esi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
imul ebx, dword [esi + 1], 0x1e35a7bd
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov eax, ecx
sub eax, 4
shr ebx, 0x14
mov dword [esp + 0x44], eax
mov eax, 0x20
lea esi, [eax + 1]
shr eax, 5
add eax, ebp
cmp dword [esp + 0x20], eax
jb 0x40fe79
mov esi, esi
lea edi, [edi]
imul ecx, dword [eax], 0x1e35a7bd
mov edx, ebp
sub edx, dword [esp + 0x1c]
mov edi, dword [edx]
shr ecx, 0x14
cmp dword [ebp], edi
mov dword [esp + 0x18], ecx
jne 0x40ff71
cmp ebp, edx
jbe 0x40ff71
mov edi, ebp
sub edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x78]
mov dword [ecx + ebx*4], edi
mov ebx, ebp
sub ebx, edx
cmp ebx, 0x3fff0
jle 0x40ffa1
mov ebp, eax
mov eax, esi
mov ebx, dword [esp + 0x18]
lea esi, [eax + 1]
shr eax, 5
add eax, ebp
cmp dword [esp + 0x20], eax
jae 0x40fe20
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x28]
cmp eax, esi
jbe 0x40febd
mov ebx, eax
sub ebx, esi
cmp ebx, 5
ja 0x4102c0
mov eax, dword [esp + 0x2c]
mov dword [eax], ebx
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov dword [esp + 8], ebx
add dword [esp + 0x2c], 4
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_memcpy
mov eax, esi
add eax, ebx
mov dword [esp + 0x3c], eax
mov ebx, dword [esp + 0x3c]
sub ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov ecx, ebx
mov edx, esi
call fcn.0040d2d0
test eax, eax
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x7c]
mov dword [esp], eax
je 0x4102a4
mov eax, esi
xor edx, edx
call fcn.0040d140
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x80]
mov eax, dword [eax]
mov edx, eax
add eax, 0xd
shr edx, 3
movzx ecx, byte [esi + edx]
mov dword [esi + edx + 4], 0
mov dword [esi + edx], ecx
mov esi, dword [esp + 0x7c]
mov ecx, ebx
mov edx, dword [esp + 0x74]
mov dword [esi], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x70]
sar eax, 2
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp], eax
mov eax, dword [esp + 0x48]
call fcn.0040d4a0
mov esi, dword [esp + 0x38]
sub dword [esp + 0x40], esi
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], eax
jne 0x40fd90
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x78]
mov ecx, ebp
lea ebx, [edi + ebx*4]
mov edi, dword [esp + 0x24]
mov edx, dword [ebx]
sub ecx, edi
mov dword [ebx], ecx
add edx, edi
mov ebx, dword [edx]
cmp dword [ebp], ebx
jne 0x40fe63
mov ebx, ebp
sub ebx, edx
cmp ebx, 0x3fff0
jg 0x40fe63
mov ecx, dword [esp + 0x44]
lea eax, [ebp + 4]
cmp eax, ecx
ja 0x4105ae
mov esi, dword [ebp + 4]
cmp dword [edx + 4], esi
mov esi, 0
je 0x40ffc8
jmp 0x40ffd2
mov edi, dword [edx + esi + 4]
cmp dword [eax], edi
jne 0x40ffd2
add eax, 4
add esi, 4
cmp eax, ecx
jbe 0x40ffc0
mov edi, dword [esp + 0x30]
cmp edi, eax
jbe 0x410001
mov ecx, esi
sub ecx, eax
add ecx, edi
mov edi, eax
movzx eax, byte [eax]
sub edi, esi
cmp byte [edx + esi + 4], al
je 0x40fffa
jmp 0x410001
movzx eax, byte [edi + esi]
cmp byte [edx + esi + 4], al
jne 0x410001
add esi, 1
cmp esi, ecx
jne 0x40fff0
lea eax, [esi + 4]
mov dword [esp + 0x4c], eax
add eax, ebp
sub ebp, dword [esp + 0x28]
mov dword [esp + 0x18], eax
cmp ebp, 5
ja 0x410408
mov eax, dword [esp + 0x2c]
mov dword [eax], ebp
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
mov eax, edi
add eax, ebp
cmp dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], eax
je 0x4104e9
lea edx, [ebx + 3]
bsr edi, edx
mov eax, edx
lea ecx, [edi - 1]
shr eax, cl
and eax, 1
lea edi, [eax + edi*2 + 0x4c]
add eax, 2
shl eax, cl
sub edx, eax
mov eax, dword [esp + 0x2c]
shl edx, 8
or edx, edi
lea edi, [eax + 8]
mov dword [eax + 4], edx
cmp dword [esp + 0x4c], 0xb
ja 0x4103ae
lea eax, [edi + 4]
add esi, 0x18
mov dword [edi], esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
jbe 0x4103fb
mov esi, dword [eax - 3]
mov edi, dword [eax + 1]
mov ecx, eax
sub ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x78]
mov eax, esi
shrd eax, edi, 8
imul edx, eax, 0x1e35a7bd
lea eax, [ecx - 2]
shr edx, 0x14
mov dword [ebp + edx*4], eax
lea edx, [ecx - 1]
imul eax, esi, 0x1e35a7bd
shrd esi, edi, 0x18
shr eax, 0x14
mov dword [ebp + eax*4], edx
imul edx, esi, 0x1e35a7bd
shr edx, 0x14
lea eax, [ebp + edx*4]
mov edx, dword [esp + 0x24]
add edx, dword [eax]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov esi, ecx
sub esi, edx
cmp esi, 0x3fff0
mov dword [esp + 0x1c], esi
jg 0x4105da
mov eax, dword [ecx]
cmp dword [edx], eax
mov dword [esp + 0x28], ecx
jne 0x41045f
mov eax, dword [esp + 0x44]
mov ebx, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
lea edi, [edx + 4]
cmp edi, dword [esp + 0x18]
mov eax, edi
ja 0x41027e
lea esi, [esi]
xor esi, esi
mov edx, dword [edx + 4]
cmp dword [ebx + 4], edx
jne 0x41027e
mov edx, dword [esp + 0x18]
jmp 0x41014e
mov edi, dword [ebx + ecx + 4]
cmp dword [eax], edi
jne 0x410158
mov esi, ecx
add eax, 4
lea ecx, [esi + 4]
cmp eax, edx
jbe 0x410144
cmp dword [esp + 0x30], eax
mov dword [esp + 0x18], edx
jbe 0x41018c
movzx edx, byte [eax]
cmp byte [ebx + esi + 8], dl
jne 0x41018c
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x18]
jmp 0x41017e
movzx edx, byte [eax]
cmp byte [ebx + ecx + 4], dl
jne 0x410188
add eax, 1
add ecx, 1
cmp esi, eax
ja 0x410175
mov dword [esp + 0x18], edi
lea eax, [ecx + 4]
add dword [esp + 0x28], eax
cmp eax, 9
ja 0x4102f1
add ecx, 0x2a
mov eax, dword [esp + 0x2c]
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
lea ebx, [eax + 3]
bsr esi, ebx
mov eax, ebx
lea ecx, [esi - 1]
shr eax, cl
and eax, 1
lea esi, [eax + esi*2 + 0x4c]
add eax, 2
shl eax, cl
sub ebx, eax
mov eax, dword [esp + 0x2c]
shl ebx, 8
or ebx, esi
mov dword [eax + 4], ebx
add eax, 8
cmp dword [esp + 0x20], edx
mov dword [esp + 0x2c], eax
mov eax, edx
jbe 0x40fe79
mov esi, dword [edx - 3]
sub eax, dword [esp + 0x24]
mov edi, dword [edx + 1]
mov ebp, dword [esp + 0x78]
imul ecx, esi, 0x1e35a7bd
lea ebx, [eax - 3]
shr ecx, 0x14
mov dword [ebp + ecx*4], ebx
mov ecx, esi
mov ebx, edi
shrd ecx, ebx, 8
imul ebx, ecx, 0x1e35a7bd
lea ecx, [eax - 2]
shr ebx, 0x14
mov dword [ebp + ebx*4], ecx
mov ecx, esi
mov ebx, edi
shrd ecx, ebx, 0x10
shrd esi, edi, 0x18
imul ebx, ecx, 0x1e35a7bd
lea ecx, [eax - 1]
shr ebx, 0x14
mov dword [ebp + ebx*4], ecx
mov ebx, dword [esp + 0x24]
imul ecx, esi, 0x1e35a7bd
shr ecx, 0x14
lea ecx, [ebp + ecx*4]
add ebx, dword [ecx]
mov dword [ecx], eax
mov eax, edx
sub eax, ebx
cmp eax, 0x3fff0
jg 0x410463
mov edi, dword [ebx]
cmp dword [edx], edi
jne 0x410463
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
lea edi, [edx + 4]
cmp edi, dword [esp + 0x18]
mov eax, edi
jbe 0x410130
cmp dword [esp + 0x30], edi
jbe 0x4105cc
mov esi, dword [esp + 0x28]
movzx edx, byte [ebx + 4]
xor ecx, ecx
cmp byte [esi + 4], dl
je 0x41016b
mov dword [esp + 0x28], edi
jmp 0x41019c
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
call fcn.0040d270
jmp 0x40ff53
cmp ebx, 0x81
ja 0x410350
lea eax, [ebx - 2]
bsr ecx, eax
mov edx, eax
sub ecx, 1
shr edx, cl
lea esi, [edx + ecx*2 + 2]
shl edx, cl
sub eax, edx
shl eax, 8
or eax, esi
mov esi, dword [esp + 0x2c]
mov dword [esi], eax
jmp 0x40fe98
cmp eax, 0x85
ja 0x410320
lea eax, [ecx - 2]
bsr ecx, eax
mov ebx, eax
sub ecx, 1
shr ebx, cl
lea esi, [ebx + ecx*2 + 0x2c]
shl ebx, cl
sub eax, ebx
mov ecx, eax
mov eax, dword [esp + 0x2c]
shl ecx, 8
or esi, ecx
mov dword [eax], esi
jmp 0x4101a5
cmp eax, 0x845
ja 0x410380
lea eax, [ecx - 0x42]
mov esi, 1
bsr ebx, eax
mov ecx, ebx
add ebx, 0x34
shl esi, cl
sub eax, esi
mov ecx, eax
mov eax, dword [esp + 0x2c]
shl ecx, 8
or ebx, ecx
mov dword [eax], ebx
jmp 0x4101a5
cmp ebx, 0x841
ja 0x410440
lea eax, [ebx - 0x42]
mov edx, 1
bsr ecx, eax
shl edx, cl
add ecx, 0xa
sub eax, edx
shl eax, 8
or ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [eax], ecx
jmp 0x40fe98
sub ecx, 0x842
shl ecx, 8
or ecx, 0x3f
jmp 0x41019f
mov eax, dword [esp + 0x74]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
jmp 0x40fe79
cmp dword [esp + 0x4c], 0x47
jbe 0x41049e
cmp dword [esp + 0x4c], 0x87
ja 0x4104fc
sub esi, 4
mov dword [edi + 4], 0x40
mov eax, esi
shl esi, 8
shr eax, 5
and esi, 0x1f00
add eax, 0x36
or eax, esi
mov dword [edi], eax
lea eax, [edi + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
ja 0x41009a
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
jmp 0x40fe79
cmp ebp, 0x81
jbe 0x410479
cmp ebp, 0x841
ja 0x410538
lea edx, [ebp - 0x42]
mov eax, 1
bsr ecx, edx
shl eax, cl
add ecx, 0xa
sub edx, eax
mov eax, edx
shl eax, 8
or ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [eax], ecx
jmp 0x410021
cmp ebx, 0x1841
ja 0x4104c6
lea eax, [ebx - 0x842]
mov esi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x15
mov dword [esi], eax
jmp 0x40fe98
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x28]
imul ebx, dword [eax + 1], 0x1e35a7bd
lea ebp, [eax + 1]
shr ebx, 0x14
jmp 0x40fe04
lea eax, [ebp - 2]
bsr ecx, eax
mov edx, eax
sub ecx, 1
shr edx, cl
lea edi, [edx + ecx*2 + 2]
shl edx, cl
sub eax, edx
shl eax, 8
or eax, edi
mov edi, dword [esp + 0x2c]
mov dword [edi], eax
jmp 0x410021
sub esi, 4
bsr ecx, esi
mov eax, esi
sub ecx, 1
shr eax, cl
lea edx, [eax + ecx*2 + 0x1c]
shl eax, cl
sub esi, eax
lea eax, [edi + 4]
shl esi, 8
or edx, esi
mov dword [esp + 0x2c], eax
mov dword [edi], edx
jmp 0x41008c
cmp ebx, 0x5841
ja 0x41055f
lea eax, [ebx - 0x1842]
mov esi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x16
mov dword [esi], eax
jmp 0x40fe98
mov eax, dword [esp + 0x2c]
mov dword [eax + 4], 0x40
lea edi, [eax + 8]
jmp 0x410075
cmp dword [esp + 0x4c], 0x847
ja 0x41058d
sub esi, 0x44
mov eax, 1
mov dword [edi + 4], 0x40
bsr ecx, esi
shl eax, cl
add ecx, 0x34
sub esi, eax
mov eax, esi
shl eax, 8
or eax, ecx
mov dword [edi], eax
lea eax, [edi + 8]
mov dword [esp + 0x2c], eax
jmp 0x41008c
cmp ebp, 0x1841
jbe 0x410576
cmp ebp, 0x5841
ja 0x4105b5
lea eax, [ebp - 0x1842]
mov edi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x16
mov dword [edi], eax
jmp 0x410021
lea eax, [ebx - 0x5842]
mov esi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x17
mov dword [esi], eax
jmp 0x40fe98
lea eax, [ebp - 0x842]
mov edi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x15
mov dword [edi], eax
jmp 0x410021
lea eax, [esi - 0x844]
mov dword [edi + 4], 0x40
shl eax, 8
or eax, 0x3f
mov dword [edi], eax
lea eax, [edi + 8]
mov dword [esp + 0x2c], eax
jmp 0x41008c
xor esi, esi
jmp 0x40ffd2
lea eax, [ebp - 0x5842]
mov edi, dword [esp + 0x2c]
shl eax, 8
or eax, 0x17
mov dword [edi], eax
jmp 0x410021
mov dword [esp + 0x28], edi
mov ecx, 0x2a
jmp 0x41019f
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], eax
jmp 0x410463