Function at 0x40e720
Capabilities:
Get geographical location
Hash data with md5
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc6c
lea eax, [esp + 0x6c]
push ebx
push esi
push edi
mov esi, ecx
push 0x3e8
push esi
push eax
call fcn.0046d4e0
add esp, 0xc
lea ecx, [esp + 0x78]
call fcn.0040e3d0
test eax, eax
je 0x40e84a
push 0x3e8
lea eax, [esp + 0x7c]
push str.roms_
push eax
call fcn.0046d4e0
add esp, 0xc
lea eax, [esp + 0x78]
push 0x3e8
push esi
push eax
call fcn.004745a0
add esp, 0xc
mov ecx, eax
call fcn.0040e3d0
test eax, eax
je 0x40e84a
push 0x49d000
push str.path.cfg
call fcn.0046b3d9
add esp, 8
mov dword [0x246d5b0], eax
test eax, eax
je 0x40e7d3
lea ecx, [esp + 0x478]
push ecx
push str._1000s
push eax
call fcn.0040e1f0
mov eax, dword [0x246d5b0]
add esp, 0xc
test eax, eax
je 0x40e7db
push eax
call fcn.0046b467
add esp, 4
jmp 0x40e7db
mov byte [esp + 0x478], 0
push 0x3e8
lea eax, [esp + 0x7c]
push esi
push eax
call fcn.0046d4e0
lea edx, [esp + 0x84]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x40e7f7
lea edi, [esp + 0x478]
sub edx, esi
dec edi
lea ebx, [edi + 1]
nop dword [eax + eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40e810
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.0040e3d0
test eax, eax
je 0x40e84a
push 0x49d018
call fcn.0040e1d0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.file_found_n
call fcn.0040e1d0
add esp, 4
call fcn.0040e280
mov eax, dword [0x4af158]
test eax, eax
je 0x40e86e
push eax
call fcn.0046b2fc
add esp, 4
push dword [0x4af288]
call fcn.0046b317
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
xor edx, edx
mov dword [0x4af158], eax
add esp, 4
mov eax, dword [0x246d5a8]
mov dword [0x246cd48], edx
test eax, eax
jne 0x40e948
mov eax, dword [0x4af288]
xor ecx, ecx
mov dword [0x246d5ac], ecx
test eax, eax
jle 0x40eb23
movd xmm1, ecx
movd xmm0, eax
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
mulss xmm1, dword [0x4a6ae8]
cvttss2si esi, xmm1
cmp edx, esi
je 0x40e905
push esi
push 0x4a02c4
push 0x4b0ef0
mov dword [0x246cd48], esi
call fcn.0040e260
add esp, 0xc
lea eax, [esi + 1]
push 0
push eax
push 0x402
push dword [0x4b1210]
call edi
mov ecx, dword [0x246d5ac]
push dword [0x246d5b0]
mov eax, dword [0x4af158]
push 0x3e8
add eax, ecx
push 1
push eax
call fcn.004748bb
mov ecx, dword [0x246d5ac]
add esp, 0x10
add ecx, eax
mov eax, dword [0x4af288]
mov dword [0x246d5ac], ecx
cmp ecx, eax
jge 0x40eb13
mov edx, dword [0x246cd48]
jmp 0x40e8b1
cmp eax, 1
jne 0x40ea05
mov eax, dword [0x4af288]
xor ecx, ecx
mov dword [0x246d5ac], ecx
test eax, eax
jle 0x40eb38
nop word [eax + eax]
movd xmm1, ecx
movd xmm0, eax
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
mulss xmm1, dword [0x4a6ae8]
cvttss2si esi, xmm1
cmp edx, esi
je 0x40e9c4
push esi
push 0x4a02c4
push 0x4b0ef0
mov dword [0x246cd48], esi
call fcn.0040e260
add esp, 0xc
lea eax, [esi + 1]
push 0
push eax
push 0x402
push dword [0x4b1210]
call edi
mov ecx, dword [0x246d5ac]
mov eax, dword [0x4af158]
push 0x3e8
add eax, ecx
push eax
push dword [0x246cd4c]
call fcn.00401850
mov ecx, dword [0x246d5ac]
add esp, 0xc
add ecx, eax
mov eax, dword [0x4af288]
mov dword [0x246d5ac], ecx
cmp ecx, eax
jge 0x40eb13
mov edx, dword [0x246cd48]
jmp 0x40e970
mov ecx, dword [0x246d5b4]
sub esp, 0xc
call fcn.00463f30
mov eax, dword [0x4af288]
xor ecx, ecx
add esp, 0xc
mov dword [0x246d5ac], ecx
test eax, eax
jle 0x40eab9
nop dword [eax + eax]
movd xmm1, ecx
movd xmm0, eax
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
mulss xmm1, dword [0x4a6ae8]
cvttss2si esi, xmm1
cmp dword [0x246cd48], esi
je 0x40ea88
push esi
push 0x4a02c4
push 0x4b0ef0
mov dword [0x246cd48], esi
call fcn.0040e260
add esp, 0xc
lea eax, [esi + 1]
push 0
push eax
push 0x402
push dword [0x4b1210]
call edi
mov ecx, dword [0x246d5ac]
mov edx, dword [0x4af158]
push 0x3e8
lea edx, [ecx + edx]
call fcn.004640c0
mov ecx, dword [0x246d5ac]
add esp, 4
add ecx, eax
mov eax, dword [0x4af288]
mov dword [0x246d5ac], ecx
cmp ecx, eax
jl 0x40ea30
mov esi, dword [0x246d5b4]
test esi, esi
je 0x40eb19
mov ebx, dword [esi + 0x9c]
test ebx, ebx
je 0x40eb19
mov eax, dword [ebx]
test eax, eax
je 0x40eadc
push eax
call fcn.0046b2fc
add esp, 4
cmp dword [ebx + 0x40], 0
mov dword [ebx], 0
je 0x40eaf4
lea eax, [ebx + 4]
push eax
call fcn.00407f30
add esp, 4
push ebx
mov dword [ebx + 0x40], 0
call fcn.0046b2fc
mov eax, dword [0x4af288]
add esp, 4
mov dword [esi + 0x9c], 0
mov esi, dword [0x246d5b4]
mov ecx, dword [0x246d5a8]
test ecx, ecx
jne 0x40eb33
push dword [0x246d5b0]
call fcn.0046b467
add esp, 4
jmp 0x40ebab
cmp ecx, 1
jne 0x40eb48
push dword [0x246cd4c]
call fcn.004023d0
add esp, 4
jmp 0x40ebab
test esi, esi
je 0x40ebb0
mov ebx, dword [esi + 0x9c]
test ebx, ebx
je 0x40eb97
mov eax, dword [ebx]
test eax, eax
je 0x40eb65
push eax
call fcn.0046b2fc
add esp, 4
cmp dword [ebx + 0x40], 0
mov dword [ebx], 0
je 0x40eb7d
lea eax, [ebx + 4]
push eax
call fcn.00407f30
add esp, 4
push ebx
mov dword [ebx + 0x40], 0
call fcn.0046b2fc
add esp, 4
mov dword [esi + 0x9c], 0
push dword [esi + 0x20]
mov eax, dword [esi + 0x14]
push dword [esi + 0x1c]
call eax
push esi
call fcn.0046b2fc
add esp, 0xc
mov eax, dword [0x4af288]
mov ecx, dword [0x4af158]
cmp byte [ecx], 0x37
jne 0x40ec29
push 0x49d044
call fcn.0040e1d0
mov eax, dword [0x4af288]
xor esi, esi
cdq
add esp, 4
sub eax, edx
mov dword [0x246d5ac], esi
mov ebx, eax
sar ebx, 1
test ebx, ebx
jle 0x40ec11
mov edx, dword [0x4af158]
nop word [eax + eax]
mov cl, byte [edx + esi*2]
movzx eax, cl
mov dword [0x246cd48], eax
mov al, byte [edx + esi*2 + 1]
mov byte [edx + esi*2], al
mov byte [edx + esi*2 + 1], cl
inc esi
cmp esi, ebx
jl 0x40ebf0
mov dword [0x246d5ac], esi
push 0x49d058
call fcn.0040e1d0
mov ecx, dword [0x4af158]
add esp, 4
mov eax, dword [0x4af288]
mov dl, byte [ecx]
cmp dl, 0x40
jne 0x40ec8b
cdq
and edx, 3
mov dword [0x246d5ac], 0
lea esi, [edx + eax]
sar esi, 2
test esi, esi
jle 0x40ec7c
lea edx, [ecx + 1]
mov dword [0x246d5ac], esi
movzx eax, byte [edx + 2]
lea edx, [edx + 4]
movzx ecx, byte [edx - 5]
mov byte [edx - 5], al
mov byte [edx - 2], cl
mov cl, byte [edx - 4]
movzx eax, cl
mov dword [0x246cd48], eax
movzx eax, byte [edx - 3]
mov byte [edx - 4], al
mov byte [edx - 3], cl
sub esi, 1
jne 0x40ec51
push 0x49d068
call fcn.0040e1d0
add esp, 4
jmp 0x40ecb2
cmp dl, 0x80
jne 0x40f325
cmp byte [ecx + 1], 0x37
jne 0x40f325
cmp byte [ecx + 2], 0x12
jne 0x40f325
cmp byte [ecx + 3], 0x40
jne 0x40f325
push str.rom_loaded_succesfully_n
call fcn.0040e1d0
mov eax, dword [0x4af15c]
add esp, 4
test eax, eax
jne 0x40ecda
push 0x1000
call fcn.0046b317
add esp, 4
mov dword [0x4af15c], eax
push 0x1000
push dword [0x4af158]
push eax
call fcn.00467d70
add esp, 0xc
push 0x64
push 0x4a02c4
push 0x4b0ef0
call fcn.0040e260
add esp, 0xc
push 0
push 0x65
push 0x402
push dword [0x4b1210]
call edi
mov ecx, dword [0x4af15c]
movzx eax, byte [ecx + 3]
push eax
movzx eax, byte [ecx + 2]
push eax
movzx eax, byte [ecx + 1]
push eax
movzx eax, byte [ecx]
push eax
push str._x__x__x__x_n
call fcn.0040e1d0
mov edx, dword [0x4af15c]
add esp, 0x14
mov ecx, dword [edx + 4]
mov esi, ecx
mov eax, ecx
shl esi, 0x10
and eax, 0xff00
shr ecx, 8
or esi, eax
and ecx, 0xff00
movzx eax, byte [edx + 7]
shl esi, 8
or esi, ecx
or esi, eax
push esi
push str.ClockRate_x_n
call fcn.0040e1d0
mov edx, dword [0x4af15c]
mov ecx, dword [edx + 0xc]
mov esi, ecx
mov eax, ecx
shl esi, 0x10
and eax, 0xff00
shr ecx, 8
or esi, eax
and ecx, 0xff00
movzx eax, byte [edx + 0xf]
shl esi, 8
or esi, ecx
or esi, eax
push esi
push str.Version:_x_n
call fcn.0040e1d0
mov edi, dword [0x4af15c]
mov ecx, dword [edi + 0x14]
mov edx, ecx
mov esi, dword [edi + 0x10]
mov eax, ecx
shl edx, 0x10
and eax, 0xff00
or edx, eax
shr ecx, 8
movzx eax, byte [edi + 0x17]
and ecx, 0xff00
shl edx, 8
or edx, ecx
mov ecx, esi
or edx, eax
shl ecx, 0x10
mov eax, esi
and eax, 0xff00
or ecx, eax
shl ecx, 8
push edx
shr esi, 8
movzx eax, byte [edi + 0x13]
and esi, 0xff00
or ecx, esi
or ecx, eax
push ecx
push str.CRC:__x__x_n
call fcn.0040e1d0
mov eax, dword [0x4af15c]
add esp, 0x1c
add eax, 0x20
push eax
push str.name:__s_n
call fcn.0040e1d0
mov ecx, dword [0x4af15c]
add esp, 8
mov esi, dword [ecx + 0x38]
mov edx, esi
shl edx, 0x10
mov eax, esi
and eax, 0xff00
or edx, eax
mov eax, esi
shr eax, 8
shl edx, 8
and eax, 0xff00
or edx, eax
movzx eax, byte [ecx + 0x3b]
or edx, eax
cmp edx, 0x4e
jne 0x40ee5a
push str.Manufacturer:_Nintendo_n
call fcn.0040e1d0
add esp, 4
jmp 0x40ee68
push esi
push str.Manufacturer:__x_n
call fcn.0040e1d0
add esp, 8
mov eax, dword [0x4af15c]
movzx eax, word [eax + 0x3c]
push eax
push str.Cartridge_ID:__x_n
call fcn.0040e1d0
mov ecx, dword [0x4af15c]
add esp, 8
movzx eax, word [ecx + 0x3e]
add eax, 0xffffffbc
cmp eax, 0x11
ja case.0x40ee98.70
movzx eax, byte [eax + 0x40f370]
jmp dword [eax*4 + 0x40f358]
push str.Country_:_Germany_n
call fcn.0040e1d0
add esp, 4
jmp 0x40ef00
push str.Country_:_United_States_n
call fcn.0040e1d0
add esp, 4
jmp 0x40ef00
push str.Country_:_Japan_n
call fcn.0040e1d0
add esp, 4
jmp 0x40ef00
push str.European_cartridge_n
call fcn.0040e1d0
add esp, 4
jmp 0x40ef00
push str.Country_:_Australie_n
call fcn.0040e1d0
mov ecx, dword [0x4af15c]
add esp, 4
movzx eax, word [ecx + 0x3e]
push eax
push str.Country_Code_:__x_n
call fcn.0040e1d0
add esp, 8
push 0x1000
push str.size:__d_n
call fcn.0040e1d0
mov edx, dword [0x4af15c]
mov ecx, dword [edx + 8]
mov esi, ecx
mov eax, ecx
shl esi, 0x10
and eax, 0xff00
shr ecx, 8
or esi, eax
and ecx, 0xff00
movzx eax, byte [edx + 0xb]
shl esi, 8
or esi, ecx
or esi, eax
push esi
push str.PC__x_n
call fcn.0040e1d0
push dword [0x4af288]
mov edx, dword [0x4af158]
lea ecx, [esp + 0x34]
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0x67452301
mov dword [esp + 0x40], 0xefcdab89
mov dword [esp + 0x44], 0x98badcfe
mov dword [esp + 0x48], 0x10325476
call fcn.0040d440
add esp, 0x14
lea edx, [esp + 0x10]
lea ecx, [esp + 0x20]
call fcn.0040d510
push str.md5_code:
call fcn.0040e1d0
add esp, 4
xor eax, eax
mov dword [0x246d5ac], eax
nop
movzx eax, byte [esp + eax + 0x10]
push eax
push 0x49d1d0
call fcn.0040e1d0
mov eax, dword [0x246d5ac]
add esp, 8
inc eax
mov dword [0x246d5ac], eax
cmp eax, 0x10
jl 0x40efb0
push 0x49d1d8
call fcn.0040e1d0
add esp, 4
call fcn.0040d790
xor ecx, ecx
mov dword [0x246d5ac], ecx
nop dword [eax]
movzx eax, byte [esp + ecx + 0x10]
push eax
lea eax, [esp + 0x7c]
lea eax, [eax + ecx*2]
push 0x49d1dc
push eax
call fcn.0040e260
mov ecx, dword [0x246d5ac]
add esp, 0xc
inc ecx
mov dword [0x246d5ac], ecx
cmp ecx, 0x10
jl 0x40eff0
mov byte [esp + 0x98], 0
xor ecx, ecx
nop word [eax + eax]
mov al, byte [esp + ecx + 0x78]
lea ecx, [ecx + 1]
mov byte [ecx + 0x4af263], al
test al, al
jne 0x40f030
lea ecx, [esp + 0x78]
call fcn.0040e020
mov esi, eax
test esi, esi
jne 0x40f208
push eax
push 0x49d1e4
call fcn.0040e1d0
mov eax, dword [0x4af15c]
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
movzx eax, word [eax + 0x3e]
push eax
bswap ecx
push ecx
bswap edx
push edx
lea eax, [esp + 0x88c]
push 0x49d1e8
push eax
call fcn.0040e260
add esp, 0x1c
lea ecx, [esp + 0x878]
call fcn.0040e0b0
mov esi, eax
test esi, esi
jne 0x40f11b
mov ecx, dword [0x4af15c]
mov edx, 0x4af160
add ecx, 0x20
sub edx, ecx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x40f0b0
mov ecx, 0x4af160
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40f0c3
mov eax, dword [str.__unknown_rom_]
mov dword [ecx], eax
mov eax, dword [0x49d1fc]
mov dword [ecx + 4], eax
mov eax, dword [0x49d200]
mov dword [ecx + 8], eax
mov ax, word [0x49d204]
mov word [ecx + 0xc], ax
mov al, byte [0x49d206]
push 0x4af160
push 0x49d208
mov byte [ecx + 0xe], al
call fcn.0040e1d0
add esp, 8
mov dword [0x4af260], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x4af420], 0
je 0x40f179
push 0x34
push 0x4a0374
push str.This_rom_is_a_bad_dump__do_you_want_to_continue_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x40f179
push dword [0x4af158]
call fcn.0046b2fc
add esp, 4
mov dword [0x4af158], 0
push dword [0x4af15c]
call fcn.0046b2fc
mov dword [0x4af15c], 0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, 0x4af160
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x40f182
mov ecx, 0x4af160
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40f195
mov eax, dword [str.__bad_dump_]
mov dword [ecx], eax
mov eax, dword [0x49d210]
mov dword [ecx + 4], eax
mov eax, dword [0x49d214]
mov dword [ecx + 8], eax
mov ecx, 0x49b3d3
lea eax, [esi + 0x9f]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f1e1
test dl, dl
je 0x40f1dd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f1e1
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f1c1
xor eax, eax
jmp 0x40f1e6
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f1f7
lea ecx, [esi + 0x9f]
call fcn.0040e020
mov esi, eax
mov eax, dword [esi + 0x64]
mov dword [0x4af260], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f210
sub ecx, edx
mov dword [0x246d5ac], ecx
test ecx, ecx
jle 0x40f23b
lea eax, [esi - 1]
add eax, ecx
cmp byte [eax], 0x5b
je 0x40f239
dec ecx
dec eax
mov dword [0x246d5ac], ecx
test ecx, ecx
jg 0x40f228
test ecx, ecx
je 0x40f2aa
mov al, byte [ecx + esi]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
cmp al, 0x54
je 0x40f25a
cmp al, 0x74
je 0x40f25a
cmp al, 0x68
je 0x40f25a
cmp al, 0x66
je 0x40f25a
cmp al, 0x6f
jne 0x40f282
cmp dword [0x4af424], 0
je 0x40f282
push 0x24
push str.Question
push str.This_rom_is_a_hacked_dump__do_you_want_to_continue_
push 0
call edi
cmp eax, 7
je 0x40f13d
mov ecx, dword [0x246d5ac]
cmp byte [ecx + esi], 0x62
jne 0x40f2aa
cmp dword [0x4af420], 0
je 0x40f2aa
push 0x34
push 0x4a0374
push str.This_rom_is_a_bad_dump__do_you_want_to_continue_
push 0
call edi
cmp eax, 7
je 0x40f13d
mov edx, 0x4af160
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x40f2b3
mov ecx, 0x49b3db
lea eax, [esi + 0x9f]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f2f0
test dl, dl
je 0x40f2ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f2f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f2d0
xor eax, eax
jmp 0x40f2f5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f306
lea ecx, [esi + 0x9f]
call fcn.0040e020
mov esi, eax
mov eax, dword [esi + 0x64]
push eax
push str.eeprom_type:_d_n
mov dword [0x4af260], eax
call fcn.0040e1d0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x49d078
call fcn.0040e1d0
add esp, 4
push dword [0x4af158]
call fcn.0046b2fc
add esp, 4
mov dword [0x4af158], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret