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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x68], 0xb0d3
mov dword [ebp - 0x10], 0x133c4
mov dword [ebp - 0xc], 0x3c99
mov dword [ebp - 8], 0x16853
mov dword [ebp - 0x14], 0x10079
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x44], edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx + 0x78]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x1c]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x20]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], 0
jmp 0x40d5a7
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x18]
jae 0x40db03
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx*4]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x1c]
mov cl, byte [eax]
mov byte [ebp - 1], cl
add dword [ebp - 0x1c], 1
cmp byte [ebp - 1], 0
jne 0x40d5d4
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x30], eax
xor ecx, ecx
mov eax, dword [ebp - 0x30]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004125d4
add esp, 4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00419a50
add esp, 0xc
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0040cbc0
add esp, 4
cmp dword [ebp + 0xc], eax
jne 0x40dad0
mov edx, dword [0x430a34]
cmp edx, dword [ebp - 8]
jg 0x40da8b
call fcn.00406380
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
imul eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
imul eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 8]
mov ecx, 0x14c1e
sub ecx, eax
add ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
shl edx, cl
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0xc]
add edx, dword [ebp - 0x14]
add edx, dword [ebp - 0xc]
add edx, dword [ebp - 0xc]
mov dword [ebp - 8], edx
mov eax, dword [0x430a6c]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x102a0
ja 0x40d6d0
cmp dword [ebp - 0x20], 0x102a0
je 0x40d77a
cmp dword [ebp - 0x20], 0x2684
je 0x40d83d
cmp dword [ebp - 0x20], 0xd29e
je 0x40d6e2
jmp 0x40da86
cmp dword [ebp - 0x20], 0x153fe
je 0x40d8f4
jmp 0x40da86
call fcn.00403e40
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x10]
or ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00402170
add esp, 0x14
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
shl edx, cl
mov ecx, dword [ebp - 0x14]
shl edx, cl
mov eax, dword [ebp - 0xc]
imul eax, dword [ebp - 0x14]
and edx, eax
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004041e0
add esp, 8
imul eax, dword [ebp - 0x14], 0x358b
imul eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
imul ecx, dword [ebp - 8]
or eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
jmp 0x40da86
mov eax, dword [0x4309a4]
cmp eax, dword [ebp - 0x14]
jne 0x40d7bd
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [0x4309a8]
je 0x40d7bd
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
sar eax, cl
and edx, eax
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
lea ecx, [edx + ecx - 0x244]
mov eax, dword [ebp - 8]
sar eax, cl
mov dword [ebp - 8], eax
jmp 0x40d83d
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00406de0
add esp, 4
cmp dword [0x430acc], eax
jbe 0x40d83d
imul edx, dword [ebp - 0x10], 0xc86c
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
imul eax, dword [ebp - 8]
add eax, 0x36adda38
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
cdq
idiv dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
shl edx, cl
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0xc]
imul ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
lea eax, [edx + ecx - 0x12588]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
imul edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
sar edx, cl
mov ecx, dword [ebp - 0x10]
add ecx, 0x9283
sar edx, cl
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0xc]
add edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x14]
and edx, 0x74ab
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c], eax
jmp 0x40d84e
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
cmp edx, dword [0x430a60]
jne 0x40d8f4
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0x7e82
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x14]
sub ecx, eax
add ecx, 0x3020
mov dword [0x430a6c], ecx
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
imul eax, dword [ebp - 8], 0x142d0
cdq
idiv dword [ebp - 8]
add eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.GDI32.dll_ModifyWorldTransform]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
sub edx, dword [ebp - 8]
or edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
cmp eax, dword [0x430a34]
jge 0x40d863
mov ecx, dword [ebp - 0xc]
push ecx
push 0xdcaa1
call dword [sym.imp.ole32.dll_OleNoteObjectVisible]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
jmp 0x40d845
mov eax, dword [ebp - 8]
cmp eax, dword [0x4309f8]
jne 0x40d9c4
push 0x86a78
push 0x9c6ff
push 0x48d62
call dword [sym.imp.GDI32.dll_GetLogColorSpaceA]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00403b90
add esp, 4
mov eax, dword [ebp - 8]
cdq
idiv dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
sar eax, cl
and eax, dword [ebp - 0x14]
and eax, dword [ebp - 0x10]
or eax, 0x15134
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00401e40
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 0x2e70]
mov dword [ebp - 0x10], edx
imul esi, dword [ebp - 0xc], 0x251a
mov eax, 0x8633
cdq
idiv dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
lea ecx, [eax + ecx + 0x116e6]
sar esi, cl
mov dword [ebp - 0x10], esi
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.GDI32.dll_GetViewportOrgEx]
mov dword [ebp - 8], eax
mov ecx, 0xfb5e
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
mov eax, 0x1257b
cdq
idiv dword [ebp - 8]
imul edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
jmp 0x40da86
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x4309a4]
je 0x40da86
mov esi, dword [ebp - 0x14]
sub esi, dword [ebp - 8]
add esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
mov ecx, eax
shl esi, cl
mov dword [ebp - 8], esi
mov ecx, dword [ebp - 0x10]
or ecx, 0x59f5
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 8], edx
imul eax, dword [ebp - 8], 0x15bb2
add eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll__lopen]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
cdq
mov ecx, 0x20c
idiv ecx
imul eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov ecx, eax
shl edx, cl
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], 0x4ff5
mov eax, dword [ebp - 8]
mov dword [ebp - 8], eax
push str.Sc2_knacker_demilitarisation_undereducated
call fcn.004010e0
add esp, 4
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x14]
add ecx, 0x17310
mov edx, dword [ebp - 0xc]
sar edx, cl
mov dword [ebp - 0x10], edx
imul eax, dword [ebp - 8], 0xd26c
add eax, dword [ebp - 0xc]
and eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
shl edx, cl
mov dword [ebp - 0xc], edx
jmp 0x40d646
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004125cf
add esp, 4
cmp dword [ebp - 0x38], 0
jne 0x40daac
mov dword [ebp - 0x58], 0
jmp 0x40dab9
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x5c]
movzx edx, word [ecx + eax*2]
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx*4]
mov eax, ecx
jmp 0x40db05
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004125cf
add esp, 4
cmp dword [ebp - 0x3c], 0
jne 0x40daf1
mov dword [ebp - 0x64], 0
jmp 0x40dafe
mov dword [ebp - 0x18], 0x8123
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x64], ecx
jmp 0x40d59e
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret