Function at 0x412330
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 4], esi
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + eax*4 + 0x80]
xor eax, eax
mov al, byte [esi + 0x7c]
mov edx, dword [ecx + 0xc]
mov ecx, dword [esi + 0x74]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x64]
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi + 0x68]
add edx, 0x28
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x6c]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [esi + 0x70]
mov dword [ebp - 0x10], edx
mov edx, dword [esi + 0x78]
cmp eax, ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ecx
jg 0x412383
mov eax, ecx
dec eax
mov ecx, 1
cmp eax, ecx
jle 0x412398
cdq
sub eax, edx
inc ecx
sar eax, 1
cmp eax, 1
jg 0x41238d
mov eax, dword [ebp + 0xc]
mov edi, dword [0x48359c]
cdq
idiv ecx
mov dword [ebp + 0xc], 1
mov dword [ebp - 8], eax
call edi
mov ecx, dword [0x4cc9f8]
mov ebx, eax
call fcn.0044cd40
test al, al
jne 0x41255f
mov esi, ebx
jmp 0x4123d2
mov esi, dword [ebp - 0xc]
mov edi, dword [0x48359c]
add esi, dword [ebp - 8]
mov dword [ebp - 0xc], esi
call edi
cmp eax, esi
jae 0x4123e4
call edi
cmp eax, esi
jb 0x4123de
pushal
shl dword [ebp + 0xc], 1
and dword [ebp - 0x40], 0
and dword [ebp - 0x3c], 0
jmp 0x4124bb
and dword [ebp - 0x38], 0
and dword [ebp - 0x34], 0
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mul dword [ebp - 0x40]
add edi, eax
mov dword [ebp - 0x30], edi
jmp 0x41247c
mov ebx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp + 0x10], 0
je 0x41243c
mov ebx, dword [ebp + 0xc]
shr ebx, 1
mov ecx, ebx
add ebx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x40]
inc ebx
inc ecx
mov eax, dword [ebp - 0x24]
cmp ebx, eax
jle 0x412431
mov ebx, eax
mov eax, dword [ebp - 0x20]
cmp ecx, eax
jle 0x41243a
mov ecx, eax
dec ebx
dec ecx
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
mul ebx
add esi, eax
mov eax, dword [ebp - 0x14]
mul ecx
add esi, eax
cmp dword [ebp - 0x18], 1
jne 0x41245e
mov esi, dword [ebp - 0x10]
movzx eax, byte [esi]
shl eax, 2
add esi, eax
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x38]
cmp ecx, dword [ebp - 0x24]
jle 0x41246e
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 0x38]
rep stosd dword es:[edi], eax
inc dword [ebp - 0x34]
mov eax, dword [ebp + 0xc]
add dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x24]
jl 0x41240d
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x20]
jle 0x412492
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x40]
mov edi, dword [ebp - 0x30]
add edi, dword [ebp - 0x28]
jmp 0x4124b0
mov esi, dword [ebp - 0x30]
mov ebx, ecx
mov edx, edi
mov ecx, dword [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov edi, edx
add edi, dword [ebp - 0x28]
loop 0x41249d
inc dword [ebp - 0x3c]
mov eax, dword [ebp + 0xc]
add dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x20]
jl 0x4123f5
popal
mov esi, dword [ebp - 4]
mov edx, dword [esi + 0x6c]
mov eax, dword [esi + 0x5c]
mov edi, dword [esi + 0x70]
mov ecx, dword [esi + 0x60]
add edx, eax
add edi, ecx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x4c], edi
mov edi, dword [esi + 0x38]
mov edx, eax
mov dword [ebp - 0x54], ecx
mov eax, ecx
mov ecx, dword [esi + 0x3c]
sub edx, edi
sub eax, ecx
mov dword [ebp - 0x48], edx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x58]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00415c30
mov edx, dword [esi + 0x3c]
mov ebx, dword [esi + 0x70]
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0x5c]
mov edi, dword [esi + 0x38]
sub ebx, edx
add ebx, eax
sub eax, edx
push ebx
mov ebx, ecx
sub ebx, edi
sub ecx, edi
add ebx, dword [esi + 0x6c]
push ebx
push eax
push ecx
lea ecx, [ebp - 0x58]
push ecx
call dword [0x48354c]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x6c]
cmp eax, ecx
jl 0x412549
cmp eax, dword [esi + 0x70]
jge 0x41255c
mov ecx, dword [0x4cc9f8]
call fcn.0044cd40
test al, al
je 0x4123c9
mov esi, dword [ebp - 4]
mov edx, dword [esi + 0x6c]
mov eax, dword [esi + 0x5c]
mov edi, dword [esi + 0x70]
mov ecx, dword [esi + 0x60]
add edx, eax
push 0
mov dword [ebp - 0x50], edx
push 0
lea edx, [ebp - 0x58]
mov dword [ebp - 0x54], ecx
add edi, ecx
push 0
push edx
mov ecx, esi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x4c], edi
call fcn.00415d70
mov ecx, eax
call fcn.0040bd20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc