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

Disassembly:
sub esp, 0x68
push ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
push edi
mov edi, eax
mov ax, word [esi + 0x36]
xor ax, word [esi + 0x34]
mov ecx, 0xff
xor ax, word [esi + 0x38]
xor ax, cx
jne 0x412c7e
cmp dword [esi + 0x5c], 0
mov byte [esp + 0x13], 1
jne 0x412c83
mov byte [esp + 0x13], 0
mov edx, dword [esi + 0x54]
mov eax, dword [edx + 0xe0c0]
test eax, eax
je 0x412ca4
cmp dword [esi + 0x50], eax
je 0x412ca4
mov eax, esi
call fcn.00411b00
test eax, eax
je 0x4130a0
mov ecx, dword [esi + 0x18]
mov ebp, dword [edi + 4]
xor edx, edx
mov eax, ebp
div ecx
mov ebx, dword [edi + 0xc]
mov eax, ebx
sub ebp, edx
xor edx, edx
div ecx
mov dword [edi + 4], ebp
sub ebx, edx
xor edx, edx
lea ebx, [ebx + ecx - 1]
mov dword [esp + 0x40], ebx
mov dword [edi + 0xc], ebx
mov ebx, dword [edi]
mov eax, ebx
div ecx
mov eax, dword [edi + 8]
sub ebx, edx
xor edx, edx
div ecx
mov eax, dword [edi + 8]
mov dword [edi], ebx
sub eax, edx
lea eax, [eax + ecx - 1]
mov dword [edi + 8], eax
mov dword [esp + 0x44], eax
xor edx, edx
mov eax, ebp
div ecx
xor edx, edx
movzx edi, byte [esi + 0x30]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x40]
div ecx
xor edx, edx
mov dword [esp + 0x74], eax
mov eax, ebx
div ecx
xor edx, edx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x44]
div ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x70], eax
mov eax, edi
imul eax, ebx
cdq
and edx, 7
add eax, edx
mov ebx, eax
mov eax, ecx
imul eax, ebp
sar ebx, 3
add ebx, eax
mov eax, edi
imul eax, dword [esp + 0x68]
add ebx, dword [esi + 0x50]
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x6c]
imul ecx, edx
mov ebp, eax
sar ebp, 3
add ebp, ecx
add ebp, dword [esi + 0x1c]
cmp byte [esi + 0x33], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x40], ebp
je 0x41302f
movzx edi, byte [esi + 0x30]
mov eax, dword [esp + 0x74]
shr edi, 3
cmp edx, eax
mov dword [esp + 0x48], edi
jge 0x4130a0
mov ecx, dword [esp + 0x70]
sub ecx, dword [esp + 0x68]
sub eax, edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x44], eax
xor edx, edx
cmp dword [esp + 0x3c], edx
mov dword [esp + 0x18], edx
jle 0x413005
mov dword [esp + 0x38], ebp
jmp 0x412db2
xor edx, edx
mov ebx, dword [esi + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x4c], ebx
cmp ebx, edx
jbe 0x412eff
xor eax, eax
cmp ebx, edx
jbe 0x412eee
movzx ecx, byte [esi + 0x3a]
mov dword [esp + 0x50], ecx
movzx ecx, word [esi + 0x34]
mov dword [esp + 0x54], ecx
movzx ecx, byte [esi + 0x3b]
mov dword [esp + 0x58], ecx
movzx ecx, word [esi + 0x36]
mov dword [esp + 0x5c], ecx
movzx ecx, byte [esi + 0x3c]
mov dword [esp + 0x60], ecx
movzx ecx, word [esi + 0x38]
mov dword [esp + 0x64], ecx
jmp 0x412e10
cmp edi, 2
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], edx
jl 0x412e77
imul ebx, dword [esp + 0x18]
mov esi, dword [esi + 4]
imul esi, dword [esp + 0x14]
add ebx, eax
imul ebx, edi
add ebx, dword [esp + 0x1c]
add edi, 0xfffffffe
shr edi, 1
xor ebp, ebp
add esi, ebx
inc edi
lea ecx, [edi + edi]
mov dword [esp + 0x20], ecx
movzx ebx, byte [esi]
mov ecx, ebp
shl ebx, cl
lea ecx, [ebp + 8]
add esi, 2
add ebp, 0x10
add dword [esp + 0x24], ebx
movzx ebx, byte [esi - 1]
shl ebx, cl
add dword [esp + 0x28], ebx
sub edi, 1
jne 0x412e48
mov edi, dword [esp + 0x48]
mov esi, dword [esp + 0x7c]
mov ebx, dword [esp + 0x4c]
cmp dword [esp + 0x20], edi
jae 0x412ea9
mov ebp, dword [esi + 4]
imul ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov edx, ebx
imul edx, dword [esp + 0x18]
add edx, eax
imul edx, edi
add edx, ecx
add ebp, edx
mov edx, dword [esp + 0x1c]
movzx edx, byte [edx + ebp]
add ecx, ecx
add ecx, ecx
add ecx, ecx
shl edx, cl
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
add ecx, ebp
add edx, ecx
mov ecx, dword [esp + 0x50]
mov ebp, edx
shr ebp, cl
mov ecx, dword [esp + 0x58]
inc eax
and ebp, dword [esp + 0x54]
add dword [esp + 0x2c], ebp
mov ebp, edx
shr ebp, cl
mov ecx, dword [esp + 0x60]
shr edx, cl
and ebp, dword [esp + 0x5c]
and edx, dword [esp + 0x64]
add dword [esp + 0x30], ebp
add dword [esp + 0x34], edx
xor edx, edx
cmp eax, ebx
jb 0x412e10
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, ebx
jb 0x412dd1
mov ecx, dword [esi + 0x18]
mov eax, dword [esp + 0x2c]
imul ecx, ecx
xor edx, edx
div ecx
xor edx, edx
mov ebx, eax
mov eax, dword [esp + 0x30]
div ecx
xor edx, edx
mov ebp, eax
mov eax, dword [esp + 0x34]
div ecx
cmp byte [esp + 0x13], 0
je 0x412fab
imul ebx, ebx, 0xb
lea eax, [eax + eax*4]
shl ebp, 4
add eax, ebp
add eax, ebx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
cmp eax, 0x20
jg 0x412f4e
mov eax, 0x101010
jmp 0x412fc1
cmp eax, 0x40
jg 0x412f5a
mov eax, 0x303030
jmp 0x412fc1
cmp eax, 0x60
jg 0x412f66
mov eax, 0x505050
jmp 0x412fc1
cmp eax, 0x80
jg 0x412f74
mov eax, 0x707070
jmp 0x412fc1
cmp eax, 0xa0
jg 0x412f82
mov eax, 0x909090
jmp 0x412fc1
cmp eax, 0xc0
jg 0x412f90
mov eax, 0xb0b0b0
jmp 0x412fc1
xor edx, edx
cmp eax, 0xe0
setg dl
dec edx
and edx, 0xffdfdfe0
add edx, 0xf0f0f0
mov eax, edx
jmp 0x412fc1
movzx ecx, byte [esi + 0x3c]
shl eax, cl
movzx ecx, byte [esi + 0x3b]
shl ebp, cl
movzx ecx, byte [esi + 0x3a]
shl ebx, cl
add eax, ebp
add eax, ebx
xor edx, edx
test edi, edi
jbe 0x412fe6
xor ebp, ebp
lea esp, [esp]
mov ecx, ebp
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp + 0x38]
inc edx
add ebp, 8
mov byte [ecx + edx - 1], bl
cmp edx, edi
jb 0x412fd0
mov eax, dword [esp + 0x18]
add dword [esp + 0x38], edi
inc eax
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
jl 0x412db0
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
mov edx, dword [esi + 0x18]
imul edx, eax
add ebx, edx
add ebp, eax
sub dword [esp + 0x44], 1
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x40], ebp
jne 0x412d94
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 4
movzx eax, byte [esi + 0x30]
mov ecx, dword [esp + 0x74]
shr eax, 3
cmp edx, ecx
mov dword [esp + 0x38], eax
jge 0x4130a0
mov edi, dword [esp + 0x70]
sub edi, dword [esp + 0x68]
sub ecx, edx
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], ecx
xor edi, edi
cmp dword [esp + 0x44], edi
jle 0x41308c
mov dword [esp + 0x7c], ebp
mov ecx, dword [esi + 0x18]
mov edx, dword [esp + 0x7c]
imul ecx, edi
imul ecx, eax
push eax
add ecx, ebx
push ecx
push edx
call fcn.00485490
mov eax, dword [esp + 0x44]
add dword [esp + 0x88], eax
inc edi
add esp, 0xc
cmp edi, dword [esp + 0x44]
jl 0x413060
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x18]
imul edx, ecx
add ebx, edx
add ebp, ecx
sub dword [esp + 0x40], 1
jne 0x413054
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 4