Function at 0x4129a0
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 + 0x4c], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x30], edx
je 0x412e80
nop
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x30]
mov eax, 0x20000
cmp ebx, 0x20000
cmovbe eax, ebx
mov edx, eax
mov dword [esp + 0x34], eax
mov eax, esi
add eax, edx
cmp edx, 0xf
mov edi, eax
mov dword [esp + 0x2c], eax
jbe 0x412f00
mov eax, ebx
sub edx, 6
mov ebx, esi
sub eax, 0x10
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x24], 0xffffffff
cmp eax, edx
cmova eax, edx
mov edx, dword [ebx + 5]
add eax, esi
add esi, 1
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 1]
shld edx, eax, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mov edx, 0x1e35a7bd
mul edx
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x70]
add edx, ecx
mov ebp, edx
shr ebp, 0xf
mov dword [esp + 0x28], eax
mov eax, edi
sub eax, 4
mov dword [esp + 0x40], eax
mov ecx, 0x20
jmp 0x412a7b
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x20]
lea edi, [eax + ebp*4]
mov ebp, esi
sub ebp, ebx
mov eax, dword [edi]
mov dword [edi], ebp
add eax, ebx
mov ebx, dword [eax]
cmp dword [esi], ebx
je 0x412d60
mov esi, ecx
mov ecx, dword [esp + 0x18]
mov ebp, edx
lea eax, [ecx + 1]
shr ecx, 5
add ecx, esi
cmp dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
jb 0x412d90
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ebx, 0x1e35a7bd
shld edx, eax, 0x10
shl eax, 0x10
imul edi, edx, 0x1e35a7bd
mul ebx
mov eax, esi
sub eax, dword [esp + 0x24]
add edx, edi
shr edx, 0xf
mov edi, dword [eax]
cmp dword [esi], edi
jne 0x412a54
movzx ebx, byte [eax + 4]
cmp byte [esi + 4], bl
jne 0x412a54
movzx ebx, byte [eax + 5]
cmp byte [esi + 5], bl
jne 0x412a54
cmp esi, eax
jbe 0x412a54
mov edi, esi
sub edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x78]
mov dword [ebx + ebp*4], edi
mov edi, esi
sub edi, eax
cmp edi, 0x3fff0
jg 0x412a73
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0x40]
lea edx, [esi + 6]
cmp edx, edi
ja 0x41339b
mov ebx, dword [esi + 6]
cmp dword [eax + 6], ebx
mov ebx, 0
jne 0x412b22
mov ecx, edi
jmp 0x412b18
mov edi, dword [eax + ebx + 6]
cmp dword [edx], edi
jne 0x412b22
add edx, 4
add ebx, 4
cmp edx, ecx
jbe 0x412b10
mov edi, dword [esp + 0x2c]
cmp edi, edx
jbe 0x412b51
mov ecx, ebx
sub ecx, edx
add ecx, edi
mov edi, edx
movzx edx, byte [edx]
sub edi, ebx
cmp byte [eax + ebx + 6], dl
je 0x412b4a
jmp 0x412b51
movzx edx, byte [edi + ebx]
cmp byte [eax + ebx + 6], dl
jne 0x412b51
add ebx, 1
cmp ebx, ecx
jne 0x412b40
lea ebp, [ebx + 6]
lea eax, [esi + ebp]
sub esi, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
cmp esi, 5
ja 0x412f5d
mov eax, dword [esp + 0x28]
mov dword [eax], esi
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
mov eax, edi
add eax, esi
mov esi, dword [esp + 0x48]
cmp dword [esp + 0x24], esi
mov dword [esp + 0x38], eax
je 0x413024
mov eax, dword [esp + 0x48]
lea edx, [eax + 3]
bsr esi, edx
mov eax, edx
lea ecx, [esi - 1]
shr eax, cl
and eax, 1
lea esi, [eax + esi*2 + 0x4c]
add eax, 2
shl eax, cl
sub edx, eax
mov eax, dword [esp + 0x28]
shl edx, 8
or edx, esi
lea esi, [eax + 8]
mov dword [eax + 4], edx
cmp ebp, 0xb
ja 0x412f1d
lea eax, [esi + 4]
add ebx, 0x1a
mov dword [esi], ebx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x1c], eax
jbe 0x412d80
mov edi, dword [eax - 1]
mov esi, dword [eax - 5]
mov ebp, eax
mov ebx, 0x1e35a7bd
sub ebp, dword [esp + 0x20]
mov edx, edi
mov eax, esi
shld edx, esi, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mul ebx
add edx, ecx
mov ecx, edx
lea edx, [ebp - 5]
shr ecx, 0xf
mov eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [ecx + eax*4], edx
mov eax, esi
mov edx, edi
shrd eax, edi, 8
shr edx, 8
shld edx, eax, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mul ebx
add edx, ecx
mov ecx, edx
lea edx, [ebp - 4]
shr ecx, 0xf
mov eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [ecx + eax*4], edx
mov ecx, esi
xor cx, cx
mov eax, ecx
mul ebx
imul ecx, edi, 0x1e35a7bd
add edx, ecx
mov esi, edx
lea edx, [ebp - 3]
shr esi, 0xf
mov eax, esi
mov esi, dword [esp + 0x78]
mov dword [esi + eax*4], edx
mov eax, dword [esp + 0x18]
mov edi, dword [eax + 2]
mov esi, dword [eax - 2]
mov edx, edi
mov eax, esi
shld edx, esi, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mul ebx
add edx, ecx
mov ecx, edx
lea edx, [ebp - 2]
shr ecx, 0xf
mov eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [ecx + eax*4], edx
mov eax, esi
mov edx, edi
shrd eax, edi, 8
shr edx, 8
shld edx, eax, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mul ebx
add edx, ecx
mov ecx, edx
lea edx, [ebp - 1]
shr ecx, 0xf
mov eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [ecx + eax*4], edx
mov ecx, esi
xor cx, cx
mov eax, ecx
mul ebx
mov ebx, dword [esp + 0x20]
imul ecx, edi, 0x1e35a7bd
add edx, ecx
mov esi, edx
shr esi, 0xf
mov eax, esi
mov esi, dword [esp + 0x78]
lea eax, [esi + eax*4]
add ebx, dword [eax]
mov dword [eax], ebp
mov ebp, dword [esp + 0x18]
mov eax, ebp
sub eax, ebx
cmp eax, 0x3fff0
jg 0x412d20
mov esi, dword [ebp]
cmp dword [ebx], esi
jne 0x412d20
movzx edx, byte [ebp + 4]
cmp byte [ebx + 4], dl
je 0x413037
lea esi, [esi]
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 1]
mov edx, dword [edi + 5]
lea esi, [edi + 1]
mov dword [esp + 0x3c], edi
shld edx, eax, 0x10
shl eax, 0x10
imul ecx, edx, 0x1e35a7bd
mov edx, 0x1e35a7bd
mul edx
mov eax, dword [esp + 0x48]
add edx, ecx
mov dword [esp + 0x24], eax
mov ebp, edx
shr ebp, 0xf
jmp 0x412a4d
movzx ebx, byte [eax + 4]
cmp byte [esi + 4], bl
jne 0x412a73
movzx ebx, byte [eax + 5]
cmp byte [esi + 5], bl
jne 0x412a73
jmp 0x412ade
mov edi, dword [esp + 0x18]
mov dword [esp + 0x3c], edi
nop
lea esi, [esi]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x3c]
cmp eax, esi
jbe 0x412dd4
mov ebx, eax
sub ebx, esi
cmp ebx, 5
ja 0x412ea0
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], ebx
add dword [esp + 0x28], 4
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_memcpy
mov eax, esi
add eax, ebx
mov dword [esp + 0x38], eax
mov ebx, dword [esp + 0x38]
sub ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
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 0x412e90
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 + 0x28]
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 + 0x4c]
call fcn.0040d4a0
mov esi, dword [esp + 0x34]
sub dword [esp + 0x44], esi
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
jne 0x4129c0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
call fcn.0040d270
jmp 0x412e6a
cmp ebx, 0x81
ja 0x412ed0
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 + 0x28]
mov dword [esi], eax
jmp 0x412daf
cmp ebx, 0x841
ja 0x412f95
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 + 0x28]
mov dword [eax], ecx
jmp 0x412daf
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
jmp 0x412d90
cmp ebp, 0x47
jbe 0x412fd9
cmp ebp, 0x87
ja 0x413316
sub ebx, 2
mov dword [esi + 4], 0x40
mov eax, ebx
shl ebx, 8
shr eax, 5
and ebx, 0x1f00
add eax, 0x36
or eax, ebx
mov dword [esi], eax
lea eax, [esi + 8]
mov dword [esp + 0x28], eax
jmp 0x412bdf
cmp esi, 0x81
jbe 0x412fb4
cmp esi, 0x841
ja 0x4132e7
lea edx, [esi - 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 + 0x28]
mov dword [eax], ecx
jmp 0x412b6e
cmp ebx, 0x1841
ja 0x413001
lea eax, [ebx - 0x842]
mov esi, dword [esp + 0x28]
shl eax, 8
or eax, 0x15
mov dword [esi], eax
jmp 0x412daf
lea eax, [esi - 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 + 0x28]
mov dword [edi], eax
jmp 0x412b6e
sub ebx, 2
bsr ecx, ebx
mov eax, ebx
sub ecx, 1
shr eax, cl
lea edx, [eax + ecx*2 + 0x1c]
shl eax, cl
sub ebx, eax
lea eax, [esi + 4]
shl ebx, 8
or edx, ebx
mov dword [esp + 0x28], eax
mov dword [esi], edx
jmp 0x412bdf
cmp ebx, 0x5841
ja 0x41334c
lea eax, [ebx - 0x1842]
mov esi, dword [esp + 0x28]
shl eax, 8
or eax, 0x16
mov dword [esi], eax
jmp 0x412daf
mov eax, dword [esp + 0x28]
mov dword [eax + 4], 0x40
lea esi, [eax + 8]
jmp 0x412bca
movzx edx, byte [ebx + 5]
cmp byte [ebp + 5], dl
jne 0x412d20
mov edi, dword [esp + 0x18]
mov dword [esp + 0x48], eax
lea esi, [edi + 6]
cmp esi, dword [esp + 0x40]
mov eax, esi
ja 0x4132c1
xor ecx, ecx
mov edx, dword [ebx + 6]
cmp dword [edi + 6], edx
jne 0x4132c1
mov esi, dword [esp + 0x40]
jmp 0x41307a
mov edi, dword [ebx + edx + 6]
cmp dword [eax], edi
jne 0x413084
mov ecx, edx
add eax, 4
lea edx, [ecx + 4]
cmp eax, esi
jbe 0x413070
cmp dword [esp + 0x2c], eax
mov ebp, edx
jbe 0x4130b5
movzx edx, byte [eax]
cmp byte [ebx + ecx + 0xa], dl
jne 0x4130b5
mov esi, dword [esp + 0x2c]
mov edx, ebp
jmp 0x4130a9
movzx ecx, byte [eax]
cmp byte [ebx + edx + 6], cl
jne 0x4130b3
add eax, 1
add edx, 1
cmp esi, eax
ja 0x4130a0
mov ebp, edx
lea eax, [ebp + 6]
add dword [esp + 0x18], eax
cmp eax, 9
ja 0x413250
lea edx, [ebp + 0x2c]
mov eax, dword [esp + 0x28]
mov dword [eax], edx
mov eax, dword [esp + 0x48]
lea edx, [eax + 3]
bsr ebx, edx
mov eax, edx
lea ecx, [ebx - 1]
shr eax, cl
and eax, 1
lea ebx, [eax + ebx*2 + 0x4c]
add eax, 2
shl eax, cl
sub edx, eax
mov eax, dword [esp + 0x28]
shl edx, 8
or edx, ebx
mov dword [eax + 4], edx
add eax, 8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x1c], eax
jbe 0x412d80
mov ebp, dword [eax - 1]
mov edi, dword [eax - 5]
mov ecx, eax
sub ecx, dword [esp + 0x20]
mov ebx, edi
mov esi, ebp
shld esi, edi, 0x10
shl ebx, 0x10
mov eax, ebx
mov ebx, 0x1e35a7bd
mul ebx
imul esi, esi, 0x1e35a7bd
add edx, esi
mov esi, dword [esp + 0x78]
shr edx, 0xf
mov eax, edx
lea edx, [ecx - 5]
mov dword [esi + eax*4], edx
mov eax, edi
mov edx, ebp
shrd eax, ebp, 8
shr edx, 8
shld edx, eax, 0x10
shl eax, 0x10
imul esi, edx, 0x1e35a7bd
mul ebx
add edx, esi
mov esi, dword [esp + 0x78]
shr edx, 0xf
mov eax, edx
lea edx, [ecx - 4]
mov dword [esi + eax*4], edx
mov edx, edi
xor dx, dx
mov eax, edx
imul esi, ebp, 0x1e35a7bd
mul ebx
add edx, esi
mov edi, edx
lea edx, [ecx - 3]
shr edi, 0xf
mov eax, edi
mov edi, dword [esp + 0x78]
mov dword [edi + eax*4], edx
mov eax, dword [esp + 0x18]
mov ebp, dword [eax + 2]
mov edi, dword [eax - 2]
mov edx, ebp
mov eax, edi
shld edx, edi, 0x10
shl eax, 0x10
imul esi, edx, 0x1e35a7bd
mul ebx
add edx, esi
mov esi, dword [esp + 0x78]
shr edx, 0xf
mov eax, edx
lea edx, [ecx - 2]
mov dword [esi + eax*4], edx
mov eax, edi
mov edx, ebp
shrd eax, ebp, 8
shr edx, 8
shld edx, eax, 0x10
shl eax, 0x10
imul esi, edx, 0x1e35a7bd
mul ebx
add edx, esi
mov esi, dword [esp + 0x78]
shr edx, 0xf
mov eax, edx
lea edx, [ecx - 1]
mov dword [esi + eax*4], edx
mov edx, edi
xor dx, dx
mov eax, edx
mul ebx
mov ebx, dword [esp + 0x20]
imul edi, ebp, 0x1e35a7bd
add edx, edi
mov edi, edx
shr edi, 0xf
mov eax, edi
lea eax, [esi + eax*4]
add ebx, dword [eax]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov eax, ecx
sub eax, ebx
cmp eax, 0x3fff0
jg 0x412d20
mov esi, dword [ebx]
cmp dword [ecx], esi
jne 0x412d20
movzx edx, byte [ebx + 4]
cmp byte [ecx + 4], dl
jne 0x412d20
movzx edx, byte [ebx + 5]
cmp byte [ecx + 5], dl
jne 0x412d20
jmp 0x413044
cmp eax, 0x85
ja 0x413280
bsr ecx, ebp
mov eax, ebp
mov edx, ebp
sub ecx, 1
shr eax, cl
lea ebx, [eax + ecx*2 + 0x2c]
shl eax, cl
sub edx, eax
mov eax, dword [esp + 0x28]
shl edx, 8
or ebx, edx
mov dword [eax], ebx
jmp 0x4130ce
cmp eax, 0x845
ja 0x4132b0
lea edx, [ebp - 0x40]
mov eax, 1
bsr ecx, edx
shl eax, cl
add ecx, 0x34
sub edx, eax
mov eax, dword [esp + 0x28]
shl edx, 8
or edx, ecx
mov dword [eax], edx
jmp 0x4130ce
lea edx, [ebp - 0x840]
shl edx, 8
or edx, 0x3f
jmp 0x4130c8
cmp dword [esp + 0x2c], esi
jbe 0x4133b9
mov edi, dword [esp + 0x18]
movzx edx, byte [ebx + 6]
xor ebp, ebp
cmp byte [edi + 6], dl
je 0x413095
mov dword [esp + 0x18], esi
jmp 0x4130c5
cmp esi, 0x1841
jbe 0x413384
cmp esi, 0x5841
ja 0x4133a2
lea eax, [esi - 0x1842]
mov edi, dword [esp + 0x28]
shl eax, 8
or eax, 0x16
mov dword [edi], eax
jmp 0x412b6e
cmp ebp, 0x847
ja 0x413363
sub ebx, 0x42
mov eax, 1
mov dword [esi + 4], 0x40
bsr ecx, ebx
shl eax, cl
add ecx, 0x34
sub ebx, eax
mov eax, ebx
shl eax, 8
or ecx, eax
lea eax, [esi + 8]
mov dword [esi], ecx
mov dword [esp + 0x28], eax
jmp 0x412bdf
lea eax, [ebx - 0x5842]
mov esi, dword [esp + 0x28]
shl eax, 8
or eax, 0x17
mov dword [esi], eax
jmp 0x412daf
lea eax, [ebx - 0x842]
mov dword [esi + 4], 0x40
shl eax, 8
or eax, 0x3f
mov dword [esi], eax
lea eax, [esi + 8]
mov dword [esp + 0x28], eax
jmp 0x412bdf
lea eax, [esi - 0x842]
mov edi, dword [esp + 0x28]
shl eax, 8
or eax, 0x15
mov dword [edi], eax
jmp 0x412b6e
xor ebx, ebx
jmp 0x412b22
lea eax, [esi - 0x5842]
mov edi, dword [esp + 0x28]
shl eax, 8
or eax, 0x17
mov dword [edi], eax
jmp 0x412b6e
mov dword [esp + 0x18], esi
mov edx, 0x2c
jmp 0x4130c8