Function at 0x512850
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 8], esi
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
push eax
push ecx
push 1
call fcn.00517b80
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x512883
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
mov eax, 0xf4240
mov dword [edx + 0x258], eax
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x25c], eax
mov edx, dword [ebp - 4]
push 0x40
mov dword [edx + 0x260], esi
push fcn.004fd0e4
mov eax, dword [ebp - 4]
push eax
call fcn.00514540
push esi
push eax
call fcn.004fd160
add esp, 0x14
test eax, eax
je 0x5128c8
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
push ecx
push edx
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00517da0
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push edx
push eax
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00514600
mov edi, dword [ebp + 8]
add esp, 0x20
cmp edi, esi
je 0x512934
mov ebx, 0x20000
push 0
call fcn.00514d30
mov cl, byte [esi + edi]
mov dl, byte [eax + esi]
add esp, 4
cmp cl, dl
je 0x512920
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x70]
or ecx, ebx
mov dword [eax + 0x70], ecx
push 0
call fcn.00514d30
mov dl, byte [eax + esi]
add esp, 4
inc esi
test dl, dl
jne 0x512901
jmp 0x512944
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x70]
mov ebx, 0x20000
or ecx, ebx
mov dword [eax + 0x70], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x70]
test ebx, ecx
je 0x5129bf
test edi, edi
je 0x5129b5
mov bl, byte [edi]
push 0
call fcn.00514d30
mov cl, byte [eax]
add esp, 4
cmp bl, cl
jne 0x512988
cmp bl, 0x31
jne 0x51297d
push 0
call fcn.00514d30
mov cl, byte [edi + 2]
mov dl, byte [eax + 2]
add esp, 4
cmp cl, dl
jne 0x512988
cmp byte [edi], 0x30
jne 0x5129bf
cmp byte [edi + 2], 0x39
jge 0x5129bf
test edi, edi
je 0x5129b5
push 0
call fcn.00514d30
push eax
push edi
push str.Application_built_with_libpng__.20s_but_running_with__.20s
lea edx, [ebp - 0x58]
push 0x50
push edx
call fcn.004fd448
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00514360
add esp, 0x20
mov esi, 1
mov dword [ebp - 8], esi
jmp 0x5129c4
mov esi, 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x512a07
mov edx, dword [ebp - 4]
mov dword [edx + 0xb4], 0x2000
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xb4]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00517d70
add esp, 8
mov ecx, dword [ebp - 4]
mov dword [ecx + 0xb0], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xb0]
test eax, eax
jne 0x512a07
mov dword [ebp - 8], esi
mov eax, dword [ebp - 4]
mov dword [eax + 0x98], 0x514770
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x9c], fcn.005147d0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov dword [eax + 0xa0], edx
mov eax, dword [ebp - 8]
test eax, eax
jne 0x512a91
push 0x38
push str.1.2.5
mov ecx, dword [ebp - 4]
add ecx, 0x78
push ecx
call fcn.004d1130
add eax, 6
add esp, 0xc
cmp eax, 6
ja case.0x512a52.5
jmp dword [eax*4 + 0x512b0c]
push str.zlib_memory_error
jmp 0x512a7b
push str.zlib_stream_error
mov eax, dword [ebp - 4]
push eax
jmp 0x512a7f
push str.zlib_version_error
mov ecx, dword [ebp - 4]
push ecx
jmp 0x512a7f
push str.Unknown_zlib_error
mov edx, dword [ebp - 4]
push edx
call fcn.00514360
add esp, 8
mov dword [ebp - 8], esi
mov eax, dword [ebp - 8]
test eax, eax
je 0x512ace
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xb0]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00517d20
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x20]
push ecx
mov dword [eax + 0xb0], 0
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00517c20
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xb0]
mov dword [ecx + 0x84], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xb4]
push 0
mov dword [ecx + 0x88], eax
push 0
mov ecx, dword [ebp - 4]
push ecx
call fcn.00514690
add esp, 0xc
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret