Function at 0x408180
Capabilities:
Get file size
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x43c570]
push ebx
push esi
push edi
mov ebx, ecx
mov dword [eax + 0x18], 0xffffffff
push 0x800
mov dword [ebp - 0xc], ebx
call fcn.0041d6de
mov esi, eax
add esp, 4
test esi, esi
jne 0x4081f6
movzx ecx, word [0x43ad06]
sub ecx, 7
je 0x4081db
sub ecx, 2
je 0x4081cd
sub ecx, 1
je 0x4081d4
mov eax, dword [str.The_system_cannot_allocate_enough_memory]
jmp 0x4081e0
mov eax, dword [str.El_sistema_no_puede_asignar_suficiente_memoria]
jmp 0x4081e0
mov eax, dword [str.Der_Speicher_reicht_nicht]
push eax
push 0xa8010f00
call fcn.00413190
add esp, 8
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x43c570]
mov dword [eax + 0x34], esi
mov esi, dword [0x43c570]
cmp dword [esi + 0x34], 0
je 0x408937
xor edx, edx
mov ecx, ebx
call fcn.00407970
mov esi, dword [0x43c570]
push 0x454
push ebx
call dword [sym.imp.USER32.dll_GetDlgItem]
lea edx, [esi + 0x2c]
mov ecx, eax
call fcn.00414fe0
test eax, eax
jg 0x408253
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20010024
jne 0x408931
push eax
call fcn.00413190
jmp 0x40892e
mov ecx, dword [0x43c570]
mov edx, 0x300012
mov ecx, dword [ecx + 0x2c]
call fcn.00415970
test eax, eax
je 0x408931
mov eax, dword [0x43bcb8]
test eax, eax
je 0x40828a
push eax
call fcn.0041d6c3
add esp, 4
mov dword [0x43bcb8], 0
mov ecx, dword [0x43c570]
mov edx, 4
push 0
push ecx
push 0
mov eax, dword [ecx + 0x2c]
mov dword [0x43bcb8], eax
mov dword [ecx + 0x2c], 0
mov ecx, dword [0x43bcb8]
push 0
call fcn.00411d20
mov ecx, dword [0x43c570]
mov dword [ecx + 0x18], eax
mov esi, dword [0x43c570]
mov edi, dword [esi + 0x18]
cmp edi, 0xffffffff
je 0x408937
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x20], eax
cmp eax, 0xffffffff
jne 0x4082ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408309
mov ecx, 0xe0010010
jmp 0x408926
cmp dword [ebp - 8], 0
jne 0x408921
mov edi, dword [0x43c570]
mov ebx, dword [edi + 4]
cmp ebx, 8
jbe 0x4083cd
nop dword [eax + eax]
mov eax, dword [edi + 8]
dec ebx
cmp byte [ebx + eax], 0
jne 0x4083c4
mov ecx, dword [edi + 4]
lea edx, [edi + 0xc]
cmp ebx, ecx
jae 0x408391
mov esi, dword [edx]
lea eax, [ebx*4]
add esi, eax
mov eax, dword [esi]
test eax, eax
je 0x40835b
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi], 0
lea edx, [edi + 0xc]
mov ecx, dword [edi + 4]
cmp ebx, ecx
jae 0x408391
lea esi, [ecx - 1]
mov dword [edi + 4], esi
sub esi, ebx
mov eax, dword [edx]
shl esi, 2
push esi
lea edx, [eax + ebx*4]
lea eax, [edx + 4]
push eax
push edx
call fcn.0041c640
mov edx, dword [edi + 4]
lea ecx, [edi + 0xc]
add esp, 0xc
shl edx, 2
call fcn.00413a60
mov ecx, dword [edi + 4]
lea eax, [ecx + 1]
mov dword [edi + 4], eax
cmp ebx, eax
jae 0x4083be
mov dword [edi + 4], ecx
sub ecx, ebx
mov edx, dword [edi + 8]
add edx, ebx
push ecx
lea eax, [edx + 1]
push eax
push edx
call fcn.0041c640
mov edx, dword [edi + 4]
lea ecx, [edi + 8]
add esp, 0xc
call fcn.00413a60
mov edi, dword [0x43c570]
cmp ebx, 8
ja 0x408320
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x408565
mov eax, 0x200
cmp ecx, eax
cmovb eax, ecx
mov dword [edi + 0x24], eax
mov esi, dword [0x43c570]
mov eax, dword [esi + 0x20]
sub eax, dword [esi + 0x24]
mov edi, dword [esi + 0x18]
cmp eax, 0x7fffffff
ja 0x408937
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push edi
call ebx
cmp eax, 0xffffffff
jne 0x408426
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408426
mov ecx, 0xa0010017
jmp 0x408926
mov ecx, dword [0x43c570]
push 0x20010010
mov eax, dword [ecx + 0x34]
mov dword [ecx + 0x30], eax
mov eax, dword [0x43c570]
mov edx, dword [eax + 0x30]
lea ecx, [eax + 0x28]
push ecx
push dword [eax + 0x24]
mov ecx, dword [eax + 0x18]
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
mov eax, dword [0x43c570]
push 0x437320
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x28]
mov byte [ecx + eax], 0
mov eax, dword [0x43c570]
push dword [eax + 0x30]
call fcn.0041a3d0
add esp, 8
mov ecx, 0x437320
test eax, eax
mov edx, 0x437321
mov eax, dword [0x43c570]
cmove ecx, edx
mov dword [eax + 0x4c], ecx
mov esi, dword [0x43c570]
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x4084b8
mov eax, dword [esi + 0x30]
dec ecx
cmp byte [ecx + eax], 0x20
ja 0x4084b8
dec dword [esi + 0x20]
mov esi, dword [0x43c570]
test ecx, ecx
jne 0x4084a1
mov eax, dword [esi + 0x20]
mov edi, dword [esi + 0x18]
cmp eax, 0x7fffffff
ja 0x408937
push 0
push 0
push eax
push edi
call ebx
cmp eax, 0xffffffff
jne 0x4084e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40841c
mov eax, dword [0x43c570]
mov edx, dword [eax + 0x4c]
mov esi, dword [eax + 0x18]
test edx, edx
jne 0x4084f7
xor ecx, ecx
jmp 0x408509
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408500
sub ecx, edi
push 0x20010016
push 0
push ecx
mov ecx, esi
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
mov eax, dword [0x43c570]
mov edx, dword [eax + 0x4c]
mov esi, dword [eax + 0x18]
test edx, edx
jne 0x408536
xor ecx, ecx
jmp 0x408549
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408540
sub ecx, edi
push 0x20010016
push 0
push ecx
mov ecx, esi
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
jmp 0x40856c
mov dword [edi + 0x4c], 0x437321
push 0
push 0
push 0xf0
push 0x520
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
cmp eax, 1
mov ecx, 0x6faf
mov eax, dword [0x43c570]
mov edx, 0xfde9
cmove ecx, edx
mov dword [eax + 0x1c], ecx
mov ecx, str.rnbqkbnr_pppppppp_8_8_8_8_PPPPPPPP_RNBQKBNR_w_KQkq___0_1
mov esi, dword [0x43c570]
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x1c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4085d6
test dx, dx
je 0x4085d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4085d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4085b0
xor eax, eax
jmp 0x4085db
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4085eb
or dword [esi], 0x20000000
mov esi, dword [0x43c570]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 4]
or eax, 0x40000000
mov ecx, dword [esi + 0xc]
push eax
call fcn.00416fd0
test eax, eax
je 0x408931
mov ecx, dword [0x43c570]
xor esi, esi
cmp dword [ecx + 4], esi
jbe 0x4086c9
cmp esi, 7
jne 0x40862e
test dword [ecx], 0x20000000
je 0x40862e
mov dword [ecx + 0x30], str._SetUp__0__
jmp 0x408637
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + esi*4]
mov dword [ecx + 0x30], eax
mov eax, dword [0x43c570]
mov edx, dword [eax + 0x30]
mov edi, dword [eax + 0x18]
test edx, edx
jne 0x40864a
xor ecx, ecx
jmp 0x408659
mov ecx, edx
lea ebx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408650
sub ecx, ebx
push 0x20010016
push 0
push ecx
mov ecx, edi
call fcn.00412150
add esp, 0xc
test eax, eax
mov eax, dword [0x43c570]
je 0x4086bd
mov edx, dword [eax + 0x4c]
mov edi, dword [eax + 0x18]
test edx, edx
jne 0x408682
xor ecx, ecx
jmp 0x408690
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408687
sub ecx, ebx
push 0x20010016
push 0
push ecx
mov ecx, edi
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x4086b8
mov ecx, dword [0x43c570]
inc esi
cmp esi, dword [ecx + 4]
jb 0x408618
jmp 0x4086c9
mov eax, dword [0x43c570]
or dword [eax], 0x80000000
mov ecx, dword [0x43c570]
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 4]
or eax, 0x80000000
mov ecx, dword [ecx + 0xc]
push eax
call fcn.00416fd0
test eax, eax
je 0x408931
mov esi, dword [0x43c570]
cmp dword [esi], 0
jl 0x408937
mov edx, dword [esi + 0x4c]
test edx, edx
jne 0x4086ff
xor ecx, ecx
jmp 0x40870d
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408704
sub ecx, edi
push 0x20010016
push 0
push ecx
mov ecx, dword [esi + 0x18]
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
mov esi, dword [0x43c570]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x1c]
add ecx, 0xc
call fcn.0040d6f0
test eax, eax
je 0x40875e
mov eax, dword [esi + 0x34]
xor ecx, ecx
mov word [eax], cx
call fcn.00408c90
mov eax, dword [0x43c570]
or dword [eax], 0x40000000
mov esi, dword [0x43c570]
mov ecx, dword [0x43c4b0]
call fcn.0040d6f0
push 0
push dword [esi + 0x1c]
push dword [esi + 0x34]
call fcn.00416da0
mov ecx, dword [0x43c570]
mov esi, eax
mov edi, dword [ecx + 0x18]
test esi, esi
jne 0x40879c
push 0x20010016
push eax
push eax
mov edx, esi
mov ecx, edi
call fcn.00412150
add esp, 0xc
mov edi, eax
jmp 0x4087c6
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4087a1
sub ecx, edx
mov edx, esi
push 0x20010016
push 0
push ecx
mov ecx, edi
call fcn.00412150
push esi
mov edi, eax
call fcn.0041d6c3
add esp, 0x10
test edi, edi
je 0x408931
mov ecx, dword [0x43c570]
xor edi, edi
mov eax, dword [ecx + 0xc]
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x408809
xor esi, esi
mov eax, dword [esi + 0x43ac04]
test eax, eax
je 0x4087fa
push eax
push ebx
call fcn.0041a159
add esp, 8
test eax, eax
jne 0x40881c
add esi, 4
inc edi
cmp esi, 0x10
jb 0x4087e2
mov ecx, dword [0x43c570]
mov edi, 3
mov edx, dword [ecx + 0x4c]
mov esi, dword [ecx + 0x18]
test edx, edx
jne 0x408846
xor ecx, ecx
jmp 0x408859
cmp edi, 0xffffffff
je 0x408803
cmp edi, 3
je 0x40883e
mov eax, dword [0x43c570]
mov edx, 0x4366bc
push 0x20010016
push 0
push 1
mov ecx, dword [eax + 0x18]
jmp 0x408863
mov ecx, dword [0x43c570]
jmp 0x40880e
mov ecx, edx
lea ebx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408850
sub ecx, ebx
push 0x20010016
push 0
push ecx
mov ecx, esi
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
mov eax, dword [0x43c570]
push 0
push dword [eax + 0x1c]
push dword [edi*4 + 0x43ac04]
call fcn.00416da0
mov ecx, dword [0x43c570]
mov esi, eax
mov edi, dword [ecx + 0x18]
test esi, esi
jne 0x4088af
push 0x20010016
push eax
push eax
mov edx, esi
mov ecx, edi
call fcn.00412150
add esp, 0xc
mov edi, eax
jmp 0x4088d9
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4088b4
sub ecx, edx
mov edx, esi
push 0x20010016
push 0
push ecx
mov ecx, edi
call fcn.00412150
push esi
mov edi, eax
call fcn.0041d6c3
add esp, 0x10
test edi, edi
je 0x408931
mov eax, dword [0x43c570]
mov edx, dword [eax + 0x4c]
mov esi, dword [eax + 0x18]
test edx, edx
jne 0x4088f0
xor ecx, ecx
jmp 0x4088fe
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4088f5
sub ecx, edi
push 0x20010016
push 0
push ecx
mov ecx, esi
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x408931
mov eax, dword [0x43c570]
or dword [eax], 0x40000000
jmp 0x408931
mov ecx, 0xa001001f
push edi
xor edx, edx
call fcn.00411f50
add esp, 4
mov esi, dword [0x43c570]
mov edi, dword [esi + 0x18]
cmp edi, 0xffffffff
je 0x408964
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x408957
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 0x18], 0xffffffff
mov esi, dword [0x43c570]
mov eax, dword [esi + 0x34]
test eax, eax
je 0x408981
push eax
call fcn.0041d6c3
mov dword [esi + 0x34], 0
add esp, 4
mov esi, dword [0x43c570]
mov eax, dword [esi]
mov ecx, dword [ebp - 4]
and eax, 0x40000000
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004194d8
mov esp, ebp
pop ebp
ret